hitman

module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2017 License: Apache-2.0

README

Docker Registry Companion

Build Status codecov Go Report Card

Companion tool for Private Docker Registry.

Features

Requirements

  • Registry 2.6+ (should be ok with > 2.3 but untested)
  • CLI access to host where Registry is running (run garbage-collect command)

Prebuilt docker image

Run somewhere on Docker enabled host:

$ docker pull dalee/hitman
$ docker run \
    -e MACARON_ENV=production \
    -e REGISTRY_URL=https://registry.example.com:5000/ \
    dalee/hitman

Put command to your favourite scheduler (cron, ci, etc..)

$ docker exec -it docker.registry \
    bin/registry garbage-collect /etc/docker/registry/config.yml

Where docker.registry is name of container running Docker Registry.

Common pitfalls

  • There is no auth, so, restrict access to UI via frontend (NGINX deny/allow for example)
  • Multiple tags could point to single digest (you can have latest and v1.0.1 tags, but they actually single image, so be careful)
  • Tag deletion will not free you hard drive space until garbage-collect command is issued
  • Depending on storage driver, you may have to manually delete empty repositories (ui will show you hint)

Licensing

Software is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Development

Setting up developer dependencies:

$ make install

You can also you yarn instead:

$ yarn --pure-lockfile

Run server:

$ go run ./bin/main.go -registry-url=https://registry.example.com:5000/

Build ui (required after any jsx/css change):

$ npm run build

Point your browser to http://localhost:4000/

Release new version

$ make docker
$ docker tag dalee/hitman:latest dalee/hitman:v1.x

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

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