I am running a CI/CD pipeline that builds my service and ends with docker-compose up -d
which brings up the service with a new docker image tag (my-service:tag1
).
But when I look at docker ps -a
the previous container (that was running image service:tag0
) does not appear anymore, and I cannot access its logs.
Why does docker-compose remove the previous container?
Is there a way to see the logs of the previous containers?