From 9f3e7a7b86f987181576a41134ef6c8cc2c7de55 Mon Sep 17 00:00:00 2001 From: Tom Wiesing Date: Sun, 8 Jan 2023 07:04:10 +0100 Subject: [PATCH] stack: Force recreating containers on 'up' call --- internal/dis/component/stack.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/dis/component/stack.go b/internal/dis/component/stack.go index 84bcc32..0fb7e83 100644 --- a/internal/dis/component/stack.go +++ b/internal/dis/component/stack.go @@ -65,9 +65,9 @@ func (ds Stack) Update(ctx context.Context, progress io.Writer, start bool) erro var errStackUp = errors.New("Stack.Up: Up returned non-zero exit code") // Up creates and starts the containers in this Stack. -// It is equivalent to 'docker compose up --remove-orphans --detach' on the shell. +// It is equivalent to 'docker compose up --force-recreate --remove-orphans --detach' on the shell. func (ds Stack) Up(ctx context.Context, progress io.Writer) error { - if code := ds.compose(ctx, stream.NonInteractive(progress), "up", "--remove-orphans", "--detach")(); code != 0 { + if code := ds.compose(ctx, stream.NonInteractive(progress), "up", "--force-recreate", "--remove-orphans", "--detach")(); code != 0 { return errStackUp } return nil