Octopus-Docker icon indicating copy to clipboard operation
Octopus-Docker copied to clipboard

Easy way to run Octopus on server 14393

Open goliat43 opened this issue 7 years ago • 4 comments

Server 2016 (14393) is still the default LTS-channel as far as I know and our Docker hosts will run that versions untill Server 2019 is a fact.

For at least Octopus server 2018.3.13 the default target was a 14393 image which meant that it worked fine doing a simple 'docker run octopusdeploy/octopusdeploy:2018.3.13'.

Now however, octopus base image is defaults to 1709 which isn't possible to run on a Server 2016 (14393). Refer to https://docs.microsoft.com/en-us/virtualization/windowscontainers/deploy-containers/version-compatibility.

Is this intentional? What would be a easy way to run a newer version of Octopus server when limited to Server 2016? Custom compose files?

goliat43 avatar Oct 17 '18 18:10 goliat43

@goliat43 . we are currently publishing 3 different Octopus container images for the 3 (current) available base images https://hub.docker.com/r/octopusdeploy/octopusdeploy/tags/ e.g. 2018.8.9-ltsc2016, 2018.8.9-1803 and 2018.8.9-1709 A manifest file is also created for 2018.8.9 (and when relevant latest) and your docker host should pull down the apropriate one based on what it can run. If you try to run Octopus octopusdeploy/octopusdeploy:2018.8.9 on your 2016 server does this not pull down and run the correct 2016 version?

zentron avatar Oct 17 '18 22:10 zentron

No, just running 'octopusdeploy/octopusdeploy:2018.8.9' doesn't work. It pulls a too new image and then fails with the very informative error "failed to register layer: re-exec error: exit status 1: output: write". After much head scratching I found out that this is the "expected" error when running a too new Windows version in a container on Server 2016.

I just ended up creating a Dockerfile with:

ARG SERVERCORE_VERSION=14393
FROM octopusdeploy/octopusdeploy:2018.8.9

And after that it worked. Guess i could have used octopusdeploy/octopusdeploy:2018.8.9:2018.8.9-ltsc2016 instead but I didn't know about the 'tag' part of Docker hub (noob) so creating a Dockerfile was easier.

Problem was that i just tried to follow the instruction for running that said (https://hub.docker.com/r/octopusdeploy/octopusdeploy)

Usage On a Windows Server 2016 server, or on Windows 10, run: docker run --name OctopusDeploy ^ --publish 81:81 ^ --env sqlDbConnectionString="..." ^ --volume c:/work/octopus-data:c:/Octopus ^ octopusdeploy/octopusdeploy

goliat43 avatar Oct 18 '18 13:10 goliat43

checking the manifest for octopusdeploy/octopusdeploy indicates that there currently is a version availble for win 2016 (10.0.14393.2551)

{
   "schemaVersion": 2,
   "mediaType": "application/vnd.docker.distribution.manifest.list.v2+json",
   "manifests": [
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 3446,
         "digest": "sha256:30f70b30cfa1b6951a81b6970eb5d5ece28f3e13188f8017a7b07a4488687fb5",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.16299.726"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 3446,
         "digest": "sha256:479f9cdcf98b11dc342d17c07fb85d54c965ced03bbbbbfeafcb61bb1c1dab0d",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.17134.345"
         }
      },
      {
         "mediaType": "application/vnd.docker.distribution.manifest.v2+json",
         "size": 3447,
         "digest": "sha256:9f8d75bd2b2b8350c54ef0b370b514b127c027b37ce4c4217f8e34d860bccd56",
         "platform": {
            "architecture": "amd64",
            "os": "windows",
            "os.version": "10.0.14393.2551"
         }
      }
   ]
}

and similarly see a version in the octopusdeploy/octopusdeploy:2018.8.9 manifest. What version of docker are you currently using? I'm wondering if you are maybe running an older version of docker that doesn't support multi-atchitecture images.

zentron avatar Oct 24 '18 07:10 zentron

I had a test on one of our test 2016 servers and i can see the problem you are getting. I might try update the version of docker on this machine and see if that resolves the problem. In the meantime referencing specifically the ltsc2016 version is probably the best way to go. ill update the docs accordingly

zentron avatar Oct 24 '18 08:10 zentron