How do I restart a Docker container/image/machine?

I’m trying to teach myself about Docker and using the docker-compose.yml to play around with images and the compose file. I’ve got the WordPress image up and running using successfully docker-compose.yml up -d via the tutorial here… https://docs.docker.com/compose/wordpress/), but as soon as I make changes to the compose file and docker-compose.yml up -d again I can’t access the changes again and have to completely delete images/containers/docker machine‘s to get my changes to work.

What am I doing wrong, what’s the process to restart/delete the minimum amount to see my docker-compose.yml changes so I can play around with docker-compose.yml?

  • Dockerized Django On Ubuntu
  • How to deploy docker image of artifactory-oss on marathon without permissions issues
  • docker daemon doesn't run on vagrant vm(centos/ubuntu)
  • nginx - insecure http server is redirecting wrongly to an https server
  • Dockerfile image path contains invalid charector
  • Vagrant Error in Centos
  • Docker volume size limit on BlueMix
  • How to connect two containers which run in two different hosts?
  • Windows Server 2016 Docker - cant install webfarm components to microsoft/iis image
  • babel-watch doesn't work from docker container on windows host when mounting a host directory as a network share
  • Creating custom Docker image
  • Docker build command with --tag unable to tag images
  • One Solution collect form web for “How do I restart a Docker container/image/machine?”

    docker-compose stop to stop the stack
    docker-compose start to start the stack

    Both above will not remove your container, but rather shutdown and start them again, without any loses, even on the container filesystem, not only the volumes

    docker-compose down will remove the containers of your services and all anonymous volumes assigned to them.

    Be aware, not all changes in the docker-compose file can be applied using start/stop, rather most of the time, you have to do a down/up. Things like volumes/ports cannot be hot-applied like this.

    Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.