Octopus Server 2020.1 Docker - Volume Mount Issue

Hi All,

We’ve been using Octopus Server self hosted for some time now on a Windows server install and are looking to migrate to running the server in a docker container.

I’m having an issue with the volume mounting. If I run this command the server starts up absolutely fine and connects to our DB OK and gets all the configs etc, but with no volume mounting to the host machine (so we don’t have our existing packages etc)

docker run --interactive --detach --name OctopusServer --publish 1322:8080 --env DB_CONNECTION_STRING="..." --env ACCEPT_EULA="Y" --env MASTER_KEY=... octopusdeploy/octopusdeploy:2020.1.8

I’ve copied all the data from c:\Octopus on our existing server to the same folder on our docker host machine, however if I try to run the same command with the --volume flag

docker run --interactive --detach --name OctopusServer --publish 1322:8080 --env DB_CONNECTION_STRING="..." --env ACCEPT_EULA="Y" --env MASTER_KEY=... --volume "c:\Octopus:c:\Octopus"  octopusdeploy/octopusdeploy:2020.1.8

I get the following error

C:\Program Files\Docker\Docker\resources\bin\docker.exe: Error response from daemon: 
container a06733bc4723bc93141c377d6abe2d0cc5f3cd308187182c1f154a8f7a184409 encountered 
an error during hcsshim::System::CreateProcess: failure in a Windows system call: The system 
cannot find the file specified. (0x2)
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail:  Provider: 00000000-0000-0000-0000-000000000000]
[Event Detail: onecore\vm\compute\management\orchestration\vmhostedcontainer\processmanagement.cpp(173)\vmcomputeagent.exe!00007FF7E625AE77: (caller: 00007FF7E620E4AB) Exception(14) tid(384) 80070002 The system cannot find the file specified.
CallContext:[\Bridge_ProcessMessage\VmHostedContainer_ExecuteProcess]
 Provider: 00000000-0000-0000-0000-000000000000] extra info: {"CommandLine":"entrypoint.bat","WorkingDirectory":"C:\\Octopus","Environment":{"ACCEPT_EULA":"Y","COMPLUS_NGenProtectedProcess_FeatureEnabled":"0","DB_CONNECTION_STRING":"...","DOTNET_RUNNING_IN_CONTAINER":"true","ENABLE_USAGE":"Y","LANG":"en-US","MASTER_KEY":"...=","OCTOPUS_INSTANCE":"OctopusServer"},"CreateStdInPipe":true,"CreateStdOutPipe":true,"CreateStdErrPipe":true,"ConsoleSize":[0,0]}.

I’ve manually removed the connection string & master key from this post

Any help much appreciated!

Hi Ben,

Thanks for getting in touch! I’m sorry about the roadblock you’ve hit in getting this set up. I’ve had a chat with my team concerning this issue, and I think the first thing we’d need to check is which image you used and if it’s the correct one. Can you confirm that detail, and if that checks out could you try running that command without the --volume parameter?

I look forward to hearing back!

Best regards,

Kenny

Hi Kenny,

Thanks for the reply. No problem these things happen.

So the image I originally used was

octopusdeploy/octopusdeploy:2020.1.8

As an experiment I also tried

octopusdeploy/octopusdeploy:2020.1.1

Both of these had the same issue when attempting to run with the --volume flag

I can confirm that both 2020.1.1 & 2020.1.8 started up fine without the --volume flag

I had a dig into the Docker logs, but i can’t find anything above and beyond the error message in the original post

Let me know if you need more info.

Many Thanks,

Ben

So I encountered this myself, and I believe I found the issue.

The clue was watching the interactive output when it went to go create the logs. I found that I had to change the internal mount point (the folder within the container) from C:/Octopus to C:/Octopus-instance, and from there it was able to finish running and create.

--volume C:/data/Octopus:c:/octopus <- fails on newest
--volume C:/data/Octopus:c:/octopus-instance <- works on newest

Hi Ben and @maximumfrost,

Thanks for keeping in touch, and my sincere apologies for having this thread slip through the cracks! I appreciate you taking the time to share your solution @maximumfrost. Did the same solution work for you Ben? Please don’t hesitate to reach out if you’re still hitting this one, and we’ll be happy to jump back into it. :slight_smile:

Best regards,

Kenny

I’m still seeing this issue in 2020.2.10. If this is the current behaviour now could we get it updated in the docs (https://octopus.com/docs/installation/octopus-in-container/octopus-server-container-windows)?

@maximumfrost how did you manage to to get that interactive output, I’m fresh to docker and can’t seem to get anything more than what @ben.corker is seeing.

Thanks

Run the lines you did before, but omit the --detach parameter. That’ll pipe stdout to your console, and give you a way to see logs.