first settings

This commit is contained in:
Alexander Zhirov 2023-05-08 16:35:22 +03:00
commit d0861c0ef2
4 changed files with 35 additions and 0 deletions

4
.env Normal file
View File

@ -0,0 +1,4 @@
REGISTRY_AUTH=htpasswd
REGISTRY_AUTH_HTPASSWD_REALM=Registry
REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password
REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY=/data

7
README.md Normal file
View File

@ -0,0 +1,7 @@
# Registry
Создание файла с аутентификацией:
```sh
~ $ htpasswd -Bc registry.passwd docker-adm
```

23
docker-compose.yml Normal file
View File

@ -0,0 +1,23 @@
# networks:
# db_registry:
# name: db_registry
services:
registry:
image: registry:2
container_name: registry
# user: 1000:1000
restart: always
environment:
- REGISTRY_AUTH:${REGISTRY_AUTH}
- REGISTRY_AUTH_HTPASSWD_REALM:${REGISTRY_AUTH_HTPASSWD_REALM}
- REGISTRY_AUTH_HTPASSWD_PATH:${REGISTRY_AUTH_HTPASSWD_PATH}
- REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY:${REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY}
# networks:
# - db_registry
ports:
- 5000:5000
volumes:
# - /var/volumes/registry:/var/lib/registry
- /var/volumes/registry/data:/data
- /var/volumes/registry/auth:/auth

1
registry.passwd Normal file
View File

@ -0,0 +1 @@
docker-adm:$2y$05$e66Y.9UqZYw1IMyLxuMdveaX31rJlIb7WNytgVv/KVaJQ5gjAIpq2