-
-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support for restart policy when doing docker run:
For example now it is possible to do eg: ``` var cmd = _docker.Run("postgres:9.6-alpine", new ContainerCreateParams { PortMappings = new[] {"40001:5432"}, RestartPolicy= RestartPolicy.Always Environment = new[] {"POSTGRES_PASSWORD=mysecretpassword"} }, _certificates);```
- Loading branch information
Mario Toffia
committed
Jul 20, 2018
1 parent
27c89d6
commit 3f469ae
Showing
5 changed files
with
103 additions
and
86 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
namespace Ductus.FluentDocker.Model.Containers | ||
{ | ||
public enum RestartPolicy | ||
{ | ||
/// <summary> | ||
/// Do not automatically restart the container. (the default). | ||
/// </summary> | ||
No = 0, | ||
/// <summary> | ||
/// Restart the container if it exits due to an error, which manifests as a non-zero exit code. | ||
/// </summary> | ||
OnFailure = 1, | ||
/// <summary> | ||
/// Restart the container unless it is explicitly stopped or Docker itself is stopped or restarted. | ||
/// </summary> | ||
UnlessStopped = 2, | ||
/// <summary> | ||
/// Always restart the container if it stops. | ||
/// </summary> | ||
Always = 3 | ||
} | ||
} |
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