Update Images
Inside the folder where the docker compose file is located, enter the following command to download the new version of the image(s)
docker compose pull
Then run the following command to recreate the container and starting it up detached from the terminal
docker compose up --force-recreate -d
ℹ️
if you have made modification to the image, use also the
--build
command:docker compose up --force-recreate --build -d
Now, if you like to remove the old image from storage, run:
docker image prune -f
⚠️
This command will remove all unused image -> all images not used in running container!
Have a question or feedback?
Found an issue I haven't covered?
Need clarification on steps?
Want to share your experience?
Please leave a comment below!