-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Podman Build Policies Explained
Tom Sweeney edited this page Nov 13, 2020
·
4 revisions
There's been some confusion over the Pull policies that are used with the podman build
command, specifically when and how images are pulled for each different policy. This Wiki page will document the behavior.
Build Command | Pull Policy | Action | Error Conditions |
---|---|---|---|
podman build (no pull specified) |
PullIfMissing | The image is pulled from the first registry it is found in during the build process only if the image is not stored locally. | An error is raised if the image does not exist locally and the image cannot be retrieved from the registry. If the registries are not reachable and an image exists locally, the locally stored image is used and no error is raised. |
podman build --pull |
PullAlways | The image is pulled from the first registry it is found in during the build process. | An error is raised if the image cannot be retrieved from the registry, even if the image is already stored locally. |
podman build --pull=true |
PullAlways | The image is pulled from the first registry it is found in during the build process. | An error is raised if the image cannot be retrieved from the registry, even if the image is already stored locally. |
podman build --pull=false |
PullIfMissing | The image is pulled from the first registry it is found in during the build process only if the image is not stored locally. | An error is raised if the image does not exist locally and the image cannot be retrieved from the registry. If the registries are not reachable and an image exists locally, the locally stored image is used and no error is raised. |
podman build --pull-always |
PullAlways | The image is pulled from the first registry it is found in during the build process. | An error is raised if the image cannot be retrieved from the registry, even if the image is already stored locally. |
podman build --pull-never |
PullNever | The image is never pulled from the registries during the build process. | An error is raised if the image does not exist locally. |
Not Currently Used | PullDifferent | The image is pulled from the first registry it is found in during the build process if it is different than the one stored locally or the image is not present locally. | An error is raised if the image does not exist locally and the image cannot be retrieved from the registries. If the registries are not reachable and an image exists locally, the locally stored image is used and no error is raised. |