Skip to main content
added 220 characters in body
Source Link
eco
  • 304
  • 2
  • 5

ToThere's no need to delete anything. To address the container andOP's question: You need to rebuild it dothe image then use up to replace the container with the newly configured imaged.

IMPORTANT: notice that the new image will automatically be tagged with latest.

Step 1: Edit Docker file
Step 2: docker-compose containerbuild
Step rm3: CONTAINERdocker-compose up

theThe docker-compose rm option stoppedup will leave all the container but did not delete it so I couldn't delete itsunchanged containers alone and replace only the containers that have a newly created image to rebuild.

To delete the container and rebuild it do

docker container rm CONTAINER

the docker-compose rm option stopped the container but did not delete it so I couldn't delete its image to rebuild.

There's no need to delete anything. To address the OP's question: You need to rebuild the image then use up to replace the container with the newly configured imaged.

IMPORTANT: notice that the new image will automatically be tagged with latest.

Step 1: Edit Docker file
Step 2: docker-compose build
Step 3: docker-compose up

The docker-compose up will leave all the unchanged containers alone and replace only the containers that have a newly created image.

Source Link
eco
  • 304
  • 2
  • 5

To delete the container and rebuild it do

docker container rm CONTAINER

the docker-compose rm option stopped the container but did not delete it so I couldn't delete its image to rebuild.