-
Notifications
You must be signed in to change notification settings - Fork 624
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add force-recreate and no-recreate for compose up command #3687
Conversation
24a6233
to
f2447f1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think an integration test might be good to add. It will be a little effort but if you can have a test that does compose up on a container that creates a sentinel file on a volume mount and dies if the sentinel was not found. For --force-recreate the container should comeback and for --no-recreate the container should stay stopped.
} | ||
} | ||
// container doesn't exist | ||
return "", nil |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should container not exist be an error condition?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think empty string + nil error is a good enough indication of a non-existent container and setting err should be saved for anything unexpected. WDTY?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep sounds good. Thanks for taking another look.
f2447f1
to
090aa99
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you update docs/command-reference.md too?
ping @pendo324 |
Will have a new revision out shortly. Sorry for the delay |
Signed-off-by: Justin Alvarez <[email protected]>
090aa99
to
69de5dd
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Enable two missing docker compose up options: --force-recreate and --no-recreate
Also made it so that only logs from the latest run are displayed in the user's terminal (otherwise, all logs will be displayed, which could be confusing to users). This is the same behavior as the docker CLI today.
One issue which I noticed is that my testing container would keep getting a new IP address in its IPAM bridge network. I think as of #2839, the iptables rules should be cleaned up when a container is stopped, but its not happening for me for some reason.