systemctl stop firewalld
docker run -d -p 5000:5000 --restart=always --name registry -v /root/config.yml:/etc/docker/registry/config.yml -v /etc/hosts:/etc/hosts registry:2
docker exec -it 0ba1bdfc1491 cat /etc/docker/registry/config.yml
docker pull ubuntu:16.04
docker tag ubuntu:16.04 localhost:5000/my-ubuntu
docker push localhost:5000/my-ubuntu
docker image remove ubuntu:16.04
docker image remove localhost:5000/my-ubuntu
docker pull localhost:5000/my-ubuntu
docker container stop registry && docker container rm -v registry
config.yml
version: 0.1
log:
fields:
service: registry
storage:
cache:
blobdescriptor: inmemory
s3:
accesskey: GWHHQI5NSYBV1A756W32
secretkey: TzDlHsn66miM9TddT85DoLqUuBBmJSzxbtTxW6sO
region: default
regionendpoint: http://docker.qct.io
bucket: registry
secure: false
v4auth: true
http:
addr: :5000
headers:
X-Content-Type-Options: [nosniff]
health:
storagedriver:
enabled: true
interval: 30s
threshold: 1
沒有留言:
張貼留言