2023-05-08 13:35:22 +00:00
|
|
|
|
# Registry
|
|
|
|
|
|
|
|
|
|
Создание файла с аутентификацией:
|
|
|
|
|
|
|
|
|
|
```sh
|
2023-05-24 14:31:29 +00:00
|
|
|
|
~ $ htpasswd -Bc registry.password <login>
|
2023-05-24 14:29:35 +00:00
|
|
|
|
```
|
|
|
|
|
|
2023-05-24 14:31:29 +00:00
|
|
|
|
Файл `registry.password` поместить в каталог `auth`:
|
2023-05-24 14:29:35 +00:00
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
...
|
|
|
|
|
volumes:
|
|
|
|
|
- /var/volumes/registry/auth:/auth
|
|
|
|
|
...
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Для авторизации в registry выполнить команду
|
|
|
|
|
|
|
|
|
|
```sh
|
2023-05-24 14:31:29 +00:00
|
|
|
|
docker login -u "<login>" -p "<password>" <address>
|
2023-05-08 13:35:22 +00:00
|
|
|
|
```
|
2023-05-08 20:17:44 +00:00
|
|
|
|
|
|
|
|
|
Доступ к registry:
|
|
|
|
|
|
|
|
|
|
```sh
|
|
|
|
|
http://<ip-address>:5000/v2/_catalog
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
Для доступа к HTTP (небезопасному) хосту из под Docker - добавить в `/etc/docker/daemon.json`:
|
|
|
|
|
|
|
|
|
|
```sh
|
2023-05-24 14:29:35 +00:00
|
|
|
|
{"insecure-registries" : ["http://<address>:5000"]}
|
2023-05-08 20:17:44 +00:00
|
|
|
|
```
|