Created
July 27, 2018 11:34
-
-
Save wegry/fb6702c8ead9fb97c4746a8564f3dd59 to your computer and use it in GitHub Desktop.
Rebuild and restart specific docker-compose containers without restarting docker-compose entirely
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| rebuild_restart () { | |
| if [ -n "$1" ] | |
| then | |
| echo "Rebuilding and restarting $@" | |
| docker-compose up --build --no-deps -d "$@" | |
| else | |
| echo "You need a container name (e.g. rebuild_restart my-container other-container)" | |
| fi | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment