Discover Packages
github.com/shipwright-io/build
cmd
mutate-image
command
Version:
v0.10.0
Opens a new window with list of versions in this module.
Published: May 31, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 15
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
Mutate Image Wrapper
As part of the build, the output image needs to be mutated (annotated and labeled). This package contains Shipwright Build owned image mutate code, which is using the crane in the background.
Features
Mutate the image with annotations
Mutate the image with labels
Development
Run the CLI code
Run it locally:
go run cmd/mutate-image/main.go \
--image $IMAGE \
--annotation "org.opencontainers.image.url=https://my-company.com/images" \
--label "maintainer=team@my-company.com"
If we are trying to mutate the image in a private registry, authentication to the registry should be done before running the command.
Run it using ko
(base image defined in .ko.yaml
)
docker run \
--rm \
--volume $HOME/.docker/config.json:/.docker/config.json \
-e DOCKER_CONFIG=.docker \
$(KO_DOCKER_REPO=ko.local ko publish --bare ./cmd/mutate-image) \
--image $IMAGE \
--annotation "org.opencontainers.image.url=https://my-company.com/images" \
--label "maintaner=team@my-company.com"
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.