registry-docker/README.md
2024-11-16 11:04:10 +01:00

48 lines
1.3 KiB
Markdown

# 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
### Tag and push
```bash
docker pull ubuntu
docker tag ubuntu registry-docker.gmolab.net:5000/ubuntu
docker login registry-docker.gmolab.net:5000
docker push registry-docker.gmolab.net:5000/ubuntu
```
### Delete
ToDo
## Set registry in Portainer
* on portainer goto on **Registries** menu and click on **+ Add registry**
* click on **Custom registry**
* type a registry name in field **Name**
* type the registry's ip address and port (xxx.xxx.xxx.xxx:5000) in field **Registry URL**
* active **Authentication** and fill the **Username** and **Password** with username/password (cf Set password)
* click on **Add registry**
## Sources
https://distribution.github.io/distribution/about/deploying/
https://medium.com/@cnadeau_/private-docker-registry-part-4-lets-secure-the-registry-250c3cef237
https://betterprogramming.pub/cleanup-your-docker-registry-ef0527673e3a
https://teplyheng.medium.com/how-to-completely-remove-docker-images-from-a-docker-registry-v2-76d8a26847ff
## Changelog
### v1.0 - 2024-11-15
#### Added
- initial version by [GMo](mailto:gilles.mouchet@gmail.com)