-
-
Notifications
You must be signed in to change notification settings - Fork 396
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docker.container
: Recreate container when args change
This PR allows the `docker.container` operation to tear down and recreate the container when operation arguments change, instead of reporting `No change` and doing nothing. This is intended to reduce the possibility for human error/need for manual intervention when changing args to `docker.container` operations. Since it is not possible to extract all operation args from e.g. `docker inspect` output, this PR takes a similar approach to Docker Compose to tackle this issue - it serializes the operation args in a deterministic way, hashes the serialized bytes, and stores this as a label on the container. If the hash differs from a currently-running container, the container is recreated. Tested: Added additional tests for behavior when args are changing/static in different scenarios
- Loading branch information
1 parent
3988181
commit 5147744
Showing
11 changed files
with
1,077 additions
and
279 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.