Skip to content

Commit

Permalink
Merge pull request compose-spec#118 from gtardif/build_pull_policy
Browse files Browse the repository at this point in the history
Add missing “build” pull_policy option
  • Loading branch information
ndeloof authored Dec 10, 2020
2 parents 68a799e + bce4ccb commit 2cb5ee2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion schema/compose-spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
"privileged": {"type": "boolean"},
"profiles": {"$ref": "#/definitions/list_of_strings"},
"pull_policy": {"type": "string", "enum": [
"always", "never", "if_not_present"
"always", "never", "if_not_present", "build"
]},
"read_only": {"type": "boolean"},
"restart": {"type": "string"},
Expand Down
1 change: 1 addition & 0 deletions spec.md
Original file line number Diff line number Diff line change
Expand Up @@ -1531,6 +1531,7 @@ If present, `profiles` SHOULD follow the regex format of `[a-zA-Z0-9][a-zA-Z0-9_
* `always`: Compose implementations SHOULD always pull the image from the registry.
* `never`: Compose implementations SHOULD NOT pull the image from a registry and SHOULD rely on the platform cached image. If there is no cached image, a failure MUST be reported.
* `if_not_present`: Compose implementations SHOULD pull the image only if it's not available in the platform cache.This SHOULD be the default option for Compose implementations without build support.
* `build`: Compose implementations SHOULD build the image. Compose implementations SHOULD rebuild the image if already present.

If `pull_policy` and `build` both presents, Compose implementations SHOULD build the image by default. Compose implementations MAY override this behavior in the toolchain.

Expand Down

0 comments on commit 2cb5ee2

Please sign in to comment.