Skip to content

Instantly share code, notes, and snippets.

@proditis
Last active September 21, 2020 08:46
Show Gist options
  • Save proditis/7d9a1993ed0634b1531f416349fa55af to your computer and use it in GitHub Desktop.
Save proditis/7d9a1993ed0634b1531f416349fa55af to your computer and use it in GitHub Desktop.
Setting up docker registry on OpenBSD

Setting up docker registry on OpenBSD

pkg_add -vvi go
go get github.com/docker/distribution/cmd/registry
export GOPATH=~/go
mkdir /mnt/registry
export REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/mnt/registry
$GOPATH/bin/registry --version
$GOPATH/bin/registry serve $GOPATH/src/github.com/docker/distribution/cmd/registry/config-example.yml

Garbage collection

$GOPATH/bin/registry garbage-collect [--dry-run] /path/to/config.yml

Sample config.yml

version: 0.1
log:
  fields:
    service: registry
storage:
  delete:
    enabled: true
  cache:
    blobdescriptor: inmemory
  filesystem:
    rootdirectory: /registry/registry
http:
  addr: 0.0.0.0:5000
  headers:
    X-Content-Type-Options: [nosniff]
#auth:
#  htpasswd:
#    realm: basic-realm
#    path: /etc/registry
health:
  storagedriver:
    enabled: true
    interval: 10s
    threshold: 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment