Skip to content

Instantly share code, notes, and snippets.

@crkrenn
Created January 11, 2022 23:28
Show Gist options
  • Save crkrenn/c2e0a6ac84c65df654d3721094b30ed3 to your computer and use it in GitHub Desktop.
Save crkrenn/c2e0a6ac84c65df654d3721094b30ed3 to your computer and use it in GitHub Desktop.
restart docker
#Procedure
export SUDO=""
# export SUDO="sudo"
#Stop the container(s) using the following command:
${SUDO} docker-compose down
#Delete all containers using the following command:
${SUDO} docker rm -f $(${SUDO} docker ps -a -q)
#Delete all volumes using the following command:
${SUDO} docker volume rm $(${SUDO} docker volume ls -q)
#Restart the containers using the following command:
docker-compose up -d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment