We are trying to use Octopus to deploy Docker containers (on linux). As a part of deployment we are trying to use
Stop a Docker Resource step to stop currently running container (from a previous deployment) but even though we configured the step only to stop container it also deletes it.
Here are the relevant parts of the deployment log:
Octopus Server version: 2019.6.8+Branch.tags-2019.6.8.Sha.2813706b187ebc8c2f63ed14cd888df3dc271563 Using Calamari.linux-x64 6.0.0 OperatingSystem: Linux ip-172-31-1-171.ap-southeast-2.compute.internal 4.14.138-114.102.amzn2.x86_64 #1 SMP Thu Aug 15 15:29:58 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux Docker version 18.06.1-ce, build e68fc7a215d7133c34aa18e3b72b4a21fd0c6136 Using filter: --filter label=Octopus.Project.Id=Projects-81 --filter label=Octopus.Environment.Id=Environments-2 Stopping container: /suspicious_chaplygin Removing container: /suspicious_chaplygin
The last line is unexpected and unwanted but we are not sure why it happens and how to force the step only to stop the container.
Also a question regarding retention policy in relation to Docker containers deployed over SSH: does it have any affect on them? I.e. will the containers/images be deleted when retention policy deletes the release?