Octopus + Docker. Application config transformation


We trying to create CI\CD pipeline using VSTS+Octopus.
Application will be deployed to docker container using Octopus.
Is this step we want to perform config transformation.
I have a question, how we can do the transformation using Octopus?


Hi Viktor,
Im glad to hear that you are keen to try out our new Docker support. Unfortunately as of the first preview release of this feature we do not currently have support for performing config transformation or file variable substitution inside containers once they start. This is something that we called out in our original Docker RFC and have been asking for feedback from the community on what the most favourable approach is given the Docker philosophy of immutable containers. I suspect that in the next Docker release we will include the option to perform such functionality, to reach into the container once it starts and perform variable replacement and config transforms. What are your thoughts on this approach?

In the meantime, I’m sorry to have to say that you may unfortunately have to work around this missing piece of the puzzle. This would probably involve passing through the current deployment environment as a Docker environment variable, then using this value to perform some XDT transformation in the startup script of the container, for example using this command line tool. Alternatively, depending on your requirements you may be able to get away with passing through all your required environment scoped variables into the container as Docker environment variables as provided on the run step. Let me know if either of these will work for you in the interim while we look at extending our Docker support.

I’m sorry that I couldn’t provide a perfect answer that you might have been looking for. It is important that we get the balance just right between making deployments simple for existing users, while keeping in line with the correct use of the Docker ecosystem. This is where we would love to get feedback from users such as yourself so let me know what you think!

Thanks again,