Docker Community Forums

Share and learn in the Docker community.

Docker stack deploy and automated Common Post-Deployment Tasks

docker
swarm

(Nguyenthaialan) #1

How to after docker stack deploy command run Common Post-Deployment Tasks in my CI???!!!
Something similar to the docker-compose exec.


(David Maze) #2

Best practice is to set up the container to do these things autonomously, often with an ENTRYPOINT script in your Dockerfile. Looking at how the standard postgres image does this might be informative: you can control the startup through a combination of environment variables and SQL scripts bind-mounted into the database container. You should not need to exec things as part of your normal workflow.