Skip to content

dokku/docker-image-labeler

docker-image-labeler CircleCI

Adds and removes labels from docker images

Requirements

  • golang 1.12+

Background

This package allows for adding and removing image labels without rebuilding images. Layer history creation time may change.

Installation

Debian packages are available via packagecloud

For a prebuilt binaries, see the github releases page.

Building from source

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

Usage

# 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