Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ruslanguns/docker-registry-migrator
CLI App to rollout docker image migration
https://github.com/ruslanguns/docker-registry-migrator
Last synced: 7 days ago
JSON representation
CLI App to rollout docker image migration
- Host: GitHub
- URL: https://github.com/ruslanguns/docker-registry-migrator
- Owner: ruslanguns
- Created: 2023-06-27T21:27:28.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-12-15T02:39:49.000Z (11 months ago)
- Last Synced: 2024-06-21T18:03:37.481Z (5 months ago)
- Language: Go
- Size: 1.59 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Docker Image Migrator
This is a command-line utility written in Go that automates the process of pulling Docker images, retagging them, and pushing them to a new Docker registry.
The utility reads from a configuration file in YAML format to get the list of Docker images to migrate and the target Docker registry.
## Installation
First, make sure you have Go installed on your machine. You also need to have Docker installed and running on your machine.
Clone the repository to your local machine:
```bash
git clone https://github.com/ruslanguns/docker-image-migrator.git
```Navigate into the directory:
```bash
cd docker-image-migrator
```To compile the project, run:
```bash
go build -o docker-image-migrator main.go
```This will create an executable named `docker-image-migrator`.
## Usage
The Docker Image Migrator is invoked from the command line.
You need to provide the path to the YAML configuration file via the --config flag.
Example:
```bash
./docker-image-migrator --config config.yaml
```## Configuration
The configuration file is in YAML format. It contains the following fields:
```yaml
images:
- name: alpine
tag: latest
- name: ubuntu
tag: latest
newRegistry: "newregistry"
```Each item in the images list has a name (the image name) and a tag.
> If the image comes from a private registry, you need to specify the full path to the image, including the registry name. For example, `registry.example.com/alpine`, and login to the registry before running the utility.
newRegistry should be the name of the target Docker registry where the images will be pushed after being pulled and retagged.
## Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
## License
MIT