Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Helper functions for working with Docker images
Synopsis
- updateImageName :: Text -> Text -> Text
- updateImageDigest :: Text -> Maybe Text -> Text
- updateImageTag :: Text -> Maybe Text -> Text
- tagImageIfMissing :: Text -> Text
Documentation
updateImageName :: Text -> Text -> Text Source #
Update the name of a docker image, keeping all other fields. For example, you can convert `python:latest` to `perl:latest`.
updateImageDigest :: Text -> Maybe Text -> Text Source #
Update the tag of a docker image, keeping all other fields.
For example, you can convert `python:3.7@sha256:11111` to `python:3.7@sha256:22222`.
Pass a Nothing
to remove the digest field.
updateImageTag :: Text -> Maybe Text -> Text Source #
Update the tag of a docker image, keeping all other fields.
For example, you can convert `python:latest` to `python:3.7`.
Pass a Nothing
to remove the tag field.
tagImageIfMissing :: Text -> Text Source #
Adds a latest
tag to a Docker image if it does not already have
a tag or digest specified, otherwise it returns the input image.