v1.0
This commit is contained in:
commit
1b8fb854e5
5
.vscode/settings.json
vendored
Normal file
5
.vscode/settings.json
vendored
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"editor.fontSize": 13,
|
||||
"terminal.integrated.fontSize": 13,
|
||||
"window.zoomLevel": 1.4,
|
||||
}
|
||||
37
README.md
Normal file
37
README.md
Normal file
@ -0,0 +1,37 @@
|
||||
# Registry
|
||||
|
||||
## Description
|
||||
This docker compose run registry on docker
|
||||
|
||||
## Certificats
|
||||
Copy crt and key files on `/home/docker/certs/`
|
||||
|
||||
## Run
|
||||
```bash
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Set password
|
||||
```bash
|
||||
cd /home/docker/registry/auth
|
||||
htpasswd -Bc registry.password gilles
|
||||
```
|
||||
|
||||
## Tests
|
||||
```bash
|
||||
docker pull ubuntu
|
||||
docker tag ubuntu registry-docker.gmolab.net:5000/ubuntu
|
||||
docker login
|
||||
docker push registry-docker.gmolab.net:5000/ubuntu
|
||||
|
||||
## Set registry in Portainer
|
||||
On portainer
|
||||
|
||||
## Sources
|
||||
https://distribution.github.io/distribution/about/deploying/
|
||||
https://medium.com/@cnadeau_/private-docker-registry-part-4-lets-secure-the-registry-250c3cef237
|
||||
|
||||
## Changelog
|
||||
### v1.0 - 2024-11-15
|
||||
#### Added
|
||||
- initial version by [GMo](mailto:gilles.mouchet@gmail.com)
|
||||
11
config.yml
Normal file
11
config.yml
Normal file
@ -0,0 +1,11 @@
|
||||
version: 0.1
|
||||
log:
|
||||
fields:
|
||||
service: registry
|
||||
storage:
|
||||
filesystem:
|
||||
rootdirectory: /var/lib/registry
|
||||
http:
|
||||
tls:
|
||||
certificate: /certs/gmolab.net.crt
|
||||
key: /certs/gmolab.net.key
|
||||
83
docker-compose.yaml
Normal file
83
docker-compose.yaml
Normal file
@ -0,0 +1,83 @@
|
||||
#version: '3'
|
||||
|
||||
#services:
|
||||
# registry:
|
||||
# image: registry:latest
|
||||
# ports:
|
||||
# - "5000:5000"
|
||||
# environment:
|
||||
# REGISTRY_AUTH: htpasswd
|
||||
# REGISTRY_AUTH_HTPASSWD_REALM: Registry
|
||||
# REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password
|
||||
# REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /registry-data
|
||||
# volumes:
|
||||
# - ./auth:/auth
|
||||
# - ./registry-data:/registry-data
|
||||
#
|
||||
#
|
||||
#
|
||||
# - '$(pwd)/certs:/certs'
|
||||
# - '$(pwd)/config.yml:/etc/docker/registry/config.yml'
|
||||
services:
|
||||
registry:
|
||||
image: 'registry:2'
|
||||
ports:
|
||||
- '5000:5000'
|
||||
# environment:
|
||||
# REGISTRY_AUTH: htpasswd
|
||||
# REGISTRY_AUTH_HTPASSWD_REALM: Registry
|
||||
# REGISTRY_AUTH_HTPASSWD_PATH: /auth/registry.password
|
||||
# REGISTRY_STORAGE_FILESYSTEM_ROOTDIRECTORY: /registry-data
|
||||
restart: always
|
||||
container_name: registry
|
||||
environment:
|
||||
- REGISTRY_HTTP_TLS_CERTIFICATE=/certs/gmolab.net.crt
|
||||
- REGISTRY_HTTP_TLS_KEY=/certs/gmolab.net.key
|
||||
- REGISTRY_AUTH=htpasswd
|
||||
- REGISTRY_AUTH_HTPASSWD_REALM=Registry
|
||||
- REGISTRY_AUTH_HTPASSWD_PATH=/auth/registry.password
|
||||
volumes:
|
||||
- /home/docker/certs:/certs
|
||||
- /home/docker/registry/auth:/auth
|
||||
- /home/docker/registry/data:/var/lib/registry
|
||||
# mysql
|
||||
# mysql:
|
||||
# image: mysql:latest
|
||||
# ports:
|
||||
# - '3306:3306'
|
||||
# container_name: mysql
|
||||
# environment:
|
||||
# - MYSQL_PASSWORD=supersecret
|
||||
# - MYSQL_ROOT_PASSWORD=pa55word
|
||||
# - MYSQL_USERNAME=root
|
||||
# - MYSQL_DATABASE=portus
|
||||
# volumes:
|
||||
# - /home/docker/portus/mysql:/var/lib/mysql
|
||||
|
||||
# portus:
|
||||
# ports:
|
||||
# - '3000:3000'
|
||||
# container_name: portus
|
||||
# links:
|
||||
# - 'registry:registry'
|
||||
# environment:
|
||||
# - REGISTRY_HOST=registry
|
||||
# - REGISTRY_PORT=5000
|
||||
# - REGISTRY_SECURE=false
|
||||
# - PORTUS_DB_ADAPTER=mysql2
|
||||
# - PORTUS_DB_POOL=5
|
||||
# - PORTUS_DB_HOST=db
|
||||
# - PORTUS_DB_PORT=3306
|
||||
# - PORTUS_DB_USERNAME=root
|
||||
# - PORTUS_DB_PASSWORD=supersecret
|
||||
# - PORTUS_DB_DATABASE=portus
|
||||
# hostname: 'true'
|
||||
# volumes:
|
||||
# - '/certs:/certs:ro'
|
||||
# - '/etc/docker:/certs/client:ro'
|
||||
# - '/etc/ssl/certs:/etc/ssl/certs:ro'
|
||||
# - '/etc/pki/ca-trust/extracted/pem:/etc/ssl/certs/ca-bundle.crt:ro'
|
||||
# - '/var/run/docker.sock:/var/run/docker.sock:Z'
|
||||
# image: 'portus/portus:latest'
|
||||
# depends_on:
|
||||
# - mysql
|
||||
Loading…
x
Reference in New Issue
Block a user