Update Docker Compose image

Make sure you are in the directory of your docker compose.

First, list running docker images

docker ps

Stop the docker you want to update

docker stop [image name]

Pull the latest version

docker compose pull

If you want to pull a certain version, use

docker compose pull [image]:[version-number]

Start the docker.

docker compose up -d

You can optionally remove old images.

docker image prune -f

Open a shell inside a container

docker exec -it [container name] sh

View container logs

docker logs [container name]

If you want to stream the logs, use -f as an argument

docker logs -f [container name]