https://github.com/bdudelsack/docker-registry-mirror
Mirror docker repositories to another registry
https://github.com/bdudelsack/docker-registry-mirror
Last synced: 5 months ago
JSON representation
Mirror docker repositories to another registry
- Host: GitHub
- URL: https://github.com/bdudelsack/docker-registry-mirror
- Owner: bdudelsack
- Created: 2017-03-16T15:42:11.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2020-12-01T16:36:23.000Z (over 5 years ago)
- Last Synced: 2025-10-08T12:56:48.357Z (8 months ago)
- Language: Go
- Size: 7.81 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Mirror docker repositories to another registry
This tool scans for matched tags on a given repository and synchronizes it with own registry.
Pull the docker image with the compiled binary
```
docker pull bdudelsack/docker-registry-mirror
```
Create `config.yaml` with configuration
```yaml
repositories:
- source: library/nginx
destination: registry.example.com/nginx
matches:
- ^1\.11(\.[0-9]+)?(-alpine)?$
- source: library/php
destination: registry.example.com/php
matches:
- ^7\.1\.2
- ^5\.6(-fpm)?$
- source: library/debian
destination: registry.example.com/debian
matches:
- ^jessie(-slim)?$
- ^latest$
- source: quay.io/coreos/hyperkube
destination: registry.example.com/hyperkube
matches:
- ^v1\.(5|6)\.[0-9]+_coreos\.[0-9]+$
auth:
registry.example.com:
username: myusername
password: mypassword
registry.hub.docker.com:
username: myusername
password: mypassword
quay.io:
username: ${MY_USERNAME}
password: ${MY_PASSWORD}
```
Run the docker container with mounted config file
```
docker run -v $PWD/config.yaml:/config.yaml bdudelsack/docker-registry-mirror
```
Specify credentials with environment variables
```
docker run -v $PWD/config.yaml:/config.yaml -e MY_USERNAME=username -e MY_PASSWORD=password bdudelsack/docker-registry-mirror
```