A colleague has alerted me to an issue he has seen in a Docker deployment.
He is running a Docker Deployment and is showing up errors but the deployment still passes.
In the step it is recreating containers and see the errors like below:
Thanks for reaching out! I’d be happy to help with your questions on the error messages being generated by this particular Docker deployment.
I’ve run into this issue previously and it appears to happen because of how Docker outputs its command results, which causes Octopus Deploy to incorrectly log these messages as errors within the task log.
Although it doesn’t cause deployments to fail it does make the task log look a little odd, so I can understand the want to clean this output up.
A few ways you could do this are by redirecting each Docker command’s output and error output to /dev/null, or, if you’d like to keep some record of the command’s output, to a file, e.g.:
docker-compose up -d > /dev/null 2>&1
To a file:
docker-compose up -d > ./docker-output.txt 2>&1
You may need to experiment with the output redirection some in order to get this to meet your needs, but let me know if I can be of any more help.