https://github.com/h2cone/pubimg
Publish image from source registry to target registries.
https://github.com/h2cone/pubimg
command-line docker-image graalvm harbor-registry
Last synced: 10 months ago
JSON representation
Publish image from source registry to target registries.
- Host: GitHub
- URL: https://github.com/h2cone/pubimg
- Owner: h2cone
- License: apache-2.0
- Created: 2023-11-15T01:47:32.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-12T06:05:33.000Z (almost 2 years ago)
- Last Synced: 2024-09-12T15:30:52.326Z (almost 2 years ago)
- Topics: command-line, docker-image, graalvm, harbor-registry
- Language: Java
- Homepage:
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# publib
Publish image from source registry to target registry.
## Usage
```shell
Usage: pubimg [-hV] -n= -ns= [-prd=] [-rp=]
-s=
Publish image from source registry to target registry
Target registry aliase
-h, --help Show this help message and exit.
-n= Source name
-ns= Target namespace
-prd= Progress refresh delay in seconds
-rp= Path to registry.properties
-s= Source registry alias
-V, --version Print version information and exit.
```
## Example
1. Create a file named `registry.properties` with the following content:
```properties
foo.host=harbor.foo.com
foo.username=foo
foo.password=foo
bar.host=harbor.bar.com
bar.username=bar
bar.password=bar
```
The file contains credentials for the source and target registries, with `foo` and `bar` as their aliases.
2. Publish image `dev/qux:latest` from `harbor.foo.com` to `harbor.bar.com`:
```shell
pubimg -rp='./registry.properties' -n='dev/qux:latest' -s=foo -ns=test bar
```
After all tasks are completed, you can find the image in `harbor.bar.com/test/qux:latest`.
## How to build native executable
### Prerequisites
* [GraalVM](https://www.graalvm.org/)
* [Apache Maven](https://maven.apache.org/)
### Building
```shell
mvn -Pnative native:compile
```