From a362bfb19b8ecba1c373fd02cd63f6f7c50be710 Mon Sep 17 00:00:00 2001 From: Luke Childs Date: Fri, 10 Jul 2020 19:13:37 +0700 Subject: [PATCH] Implement rebuild command --- umbrel-dev | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/umbrel-dev b/umbrel-dev index 9f6d2ad..5ce2f9d 100755 --- a/umbrel-dev +++ b/umbrel-dev @@ -15,7 +15,7 @@ Commands: boot Boot the development VM halt Halt the development VM destroy Destroy the development VM - rebuild [] Rebuild all or a specific container + rebuild Rebuild a container logs Stream Umbrel logs run Run a command inside the development VM ssh Get an SSH session inside the development VM @@ -103,7 +103,16 @@ fi # TODO: Rebuild all or a specific container if [[ "$command" = "rebuild" ]]; then - echo "Not yet implemented." + if [ -z ${2+x} ]; then + echo "A second argument is required!" + exit 1 + fi + container="$2" + run " \ + docker-compose build $container \ + && docker-compose stop $container \ + && docker-compose rm -f $container \ + && docker-compose up -d $container" exit fi