Adds and removes labels from docker images
- golang 1.12+
This package allows for adding and removing image labels without rebuilding images. Layer history creation time may change.
Debian packages are available via packagecloud
For a prebuilt binaries, see the github releases page.
A make target is provided for building the package from source.
make build
In addition, builds can be performed in an isolated Docker container:
make build-docker-image build-in-docker
# pull an image
docker image pull mysql:8
# add a label
./docker-image-labeler relabel --label=mysql.version=8 mysql:8
# remove the label
./docker-image-labeler relabel --remove-label=mysql.version mysql:8