How to update existing images with docker-compose?

Docker containers are designed to be ephemeral. To update an existing container, you remove the old one and start a new one.
Thus the process that you are following is the correct one.

You can simplify the commands to the following ones:

docker-compose up --force-recreate --build -d
docker image prune -f

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)