skip to Main Content

I ran this command docker-compose up -d inside a directory called hosting.

How can I uninstall that image it created, so I can reinstall it.

2

Answers


  1. You can remove the image by using the command:

    docker rmi <image-name>:<image-version>
    

    To list all images you can use:

    docker images
    
    Login or Signup to reply.
  2. You can simply again go to the hosting directory and run this:

    docker-compose down
    

    Or via -f argument specify the docker-compose file path:

    docker-compose -f /path_to/hosting/docker-compose.yml down
    

    When you use this, it stops the created containers and removes them.

    Also if you want to update it, just do your work in your project (update the codes, the files and so on), then run this command to build the container:

    docker-compose up -d --build
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search