Skip to content

Instantly share code, notes, and snippets.

@pepitoria
Last active February 8, 2022 10:16
Show Gist options
  • Save pepitoria/23f7eb8b243cec402088da6c88a321ef to your computer and use it in GitHub Desktop.
Save pepitoria/23f7eb8b243cec402088da6c88a321ef to your computer and use it in GitHub Desktop.
Script to update all containers configured in the user docker directory with docker-compose.
# your docker folder path
DOCKER_DIR=/home/pep/docker
cd $DOCKER_DIR \
&& docker-compose pull \
&& docker-compose up --force-recreate --build -d \
&& docker image prune -f
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment