mutate-image

command
v0.10.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 31, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

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"
    

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL