garrensmith commented on issue #3: Docker for Windows image URL: https://github.com/apache/couchdb-docker/issues/3#issuecomment-297037119 by @drnybble: As discussed in moby/moby#31524 the cause of failure with Couch 1.6 is a defect in the Erlang version it uses. I have created a Dockerfile for Couch 2.0.0.1 and it works (the problem area of the Erlang code is extensively reworked and no longer has this problem). I am attaching the Dockerfile here if it is useful. ``` Here it is...relies on you having downloaded the .msi already. It seems that couchdb 2.0 requires a post-install step to configure the system for single node or clustering. I am still thinking of the best way to do that to avoids lots of errors in the logs about missing databases. FROM microsoft/windowsservercore # Switch the default shell used with RUN to PowerShell SHELL ["powershell", "-Command", "$ErrorActionPreference = 'Stop';"] # REMARK: Temporary workaround for https://github.com/docker/docker/issues/31093 RUN set-itemproperty -path 'HKLM:\SYSTEM\CurrentControlSet\Services\Dnscache\Parameters' -Name ServerPriorityTimeLimit -Value 0 -Type DWord COPY apache-couchdb-2.0.0.1.msi C:/ # Stop & remove the service that the .msi installs (there are no properties exposed by the .msi to prevent it in the first place) # We need empty data and log directories to be able make those volumes under Windows but they have contents due to the service having run. # I was unable to remove the .delete directory in the data directory, so renaming the directories was the easiest solution # Also bind couchdb to other than localhost RUN Start-Process 'C:\Windows\System32\msiexec.exe' -ArgumentList '/i C:\apache-couchdb-2.0.0.1.msi /qn' -wait ; \ Remove-Item 'C:\apache-couchdb-2.0.0.1.msi' ; \ C:\couchdb\bin\nssm.exe stop 'Apache CouchDB' > $null ; \ C:\couchdb\bin\nssm.exe remove 'Apache CouchDB' confirm > $null ; \ mv C:\couchdb\data C:\couchdb\_data ; \ mv C:\couchdb\var\log C:\couchdb\var\_log ; \ New-Item -Path C:\couchdb\data -Type directory > $null ; \ New-Item -Path C:\couchdb\var\log -Type directory > $null ; \ Copy-Item C:/CouchDB/etc/local.ini C:/CouchDB/etc/local.ini.orig ; \ cat C:/CouchDB/etc/local.ini.orig | % { $_ -replace ';bind_address = 127.0.0.1', 'bind_address = 0.0.0.0' } | Out-File C:/CouchDB/etc/local.ini -encoding ASCII WORKDIR C:/CouchDB/ VOLUME C:/couchdb/data VOLUME C:/couchdb/var/log EXPOSE 5984 CMD ./bin/couchdb.cmd ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
With regards, Apache Git Services
