Skip to content

Instantly share code, notes, and snippets.

@VerosK
Created June 30, 2022 08:18
Show Gist options
  • Save VerosK/7ea1f130232a99a727c852cd38caee54 to your computer and use it in GitHub Desktop.
Save VerosK/7ea1f130232a99a727c852cd38caee54 to your computer and use it in GitHub Desktop.
Registry skeleton
# /etc/systemd/system/registry.service
[Unit]
Description=Registry
Documentation=https://docs.docker.com/registry/configuration/
Wants=network-online.target
After=network-online.target
[Install]
WantedBy=multi-user.target
[Service]
Type=single
KillMode=process
Restart=always
RestartSec=15s
User=registry
ExecStartPre=-/bin/mkdir -p /var/lib/registry
ExecStartPre=-/bin/chown -R registry:registry /var/lib/registry
ExecStart=/usr/local/bin/registry serve \
/etc/registry.yaml
# /etc/registry.yaml
version: 0.1
storage:
filesystem:
rootdirectory: /var/lib/registry
maintenance:
uploadpurging:
enabled: true
age: 168h
interval: 24h
dryrun: false
readonly:
enabled: true
http:
addr: :5000
secret: cac0a7d3f7862decd17516869fe3ad94
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment