Browse Source

Add docker-compose config

master
meskio 3 years ago
parent
commit
62a912f87e
Signed by: meskio
GPG Key ID: 52B8F5AC97A2DA86
  1. 11
      README.md
  2. 13
      docker-compose.yml

11
README.md

@ -1,7 +1,14 @@
docker registry image
---------------------
Expose the port 5000 to be able to access it:
You need to create `/srv/registry` and `/srv/auth` folders and htpasswd file (using htpassword from apache2-utils package):
```
docker run registry -p 5000:5000
$ mkdir /srv/registry
$ mkdir /srv/auth
$ htpasswd -cB /srv/auth/htpasswd registry
```
Start the registry using docker compose (in the folder with the docker-compose.yml):
```
$ docker-compose up -d
```

13
docker-compose.yml

@ -0,0 +1,13 @@
registry:
restart: always
image: localhost:5000/registry
ports:
- 5000:5000
environment:
REGISTRY_AUTH: htpasswd
REGISTRY_AUTH_HTPASSWD_PATH: /etc/auth/htpasswd
REGISTRY_AUTH_HTPASSWD_REALM: Registry Realm
volumes:
- /srv/registry:/var/lib/docker-registry
- /srv/auth:/etc/auth
Loading…
Cancel
Save