I am running production code within an active docker container. I would like to use the Gitlab CI tool to auto deploy changes to the production environment WITHIN the docker container.
I am having trouble finding a clean way to do this.
One idea I have is to simply log into the docker container as part of the gitlab-ci automation script
- docker exec -it 82jf72h8dj2 bash
- then git pull from the appropriate directory
In theory, this will work... but what happens when the docker ID changes? Is there any way to detect this as part of the script? I would hate to have to keep updating the CICD variable since the docker ID seems to change fairly often...