1
0
mirror of https://github.com/regclient/regclient.git synced 2025-04-18 22:44:00 +03:00

Document ghcr.io image names

Signed-off-by: Brandon Mitchell <git@bmitch.net>
This commit is contained in:
Brandon Mitchell 2023-03-19 20:10:05 -04:00
parent e07b6ce435
commit 4424131f4d
No known key found for this signature in database
GPG Key ID: 6E0FF28C767A8BEE
9 changed files with 28 additions and 28 deletions

View File

@ -27,7 +27,7 @@ case "$1" in
docker container run $opts -i --rm --net host \
-u "$(id -u):$(id -g)" -e HOME -v $HOME:$HOME \
-v /etc/docker/certs.d:/etc/docker/certs.d:ro \
regclient/regctl:latest "$@"
ghcr.io/regclient/regctl:latest "$@"
fi
;;
esac

View File

@ -64,7 +64,7 @@ spec:
spec:
containers:
- name: regsync
image: regclient/regsync:latest
image: ghcr.io/regclient/regsync:latest
imagePullPolicy: IfNotPresent
args: ["server", "-c", "/etc/regsync/regsync.yml"]
volumeMounts:

View File

@ -37,6 +37,6 @@ sync:
- "application/vnd.docker.distribution.manifest.list.v2+json"
- "application/vnd.oci.image.manifest.v1+json"
- "application/vnd.oci.image.index.v1+json"
- source: regclient/regctl:latest
- source: ghcr.io/regclient/regctl:latest
target: registry:5000/regclient/regctl:latest
type: image

View File

@ -38,7 +38,7 @@ For `regctl` (include a `-t` for any commands that require a tty, e.g. `registry
```shell
docker container run -i --rm --net host \
-v regctl-conf:/home/appuser/.regctl/ \
regclient/regctl:latest --help
ghcr.io/regclient/regctl:latest --help
```
For `regsync`:
@ -46,7 +46,7 @@ For `regsync`:
```shell
docker container run -i --rm --net host \
-v "$(pwd)/regsync.yml:/home/appuser/regsync.yml" \
regclient/regsync:latest -c /home/appuser/regsync.yml check
ghcr.io/regclient/regsync:latest -c /home/appuser/regsync.yml check
```
For `regbot`:
@ -54,7 +54,7 @@ For `regbot`:
```shell
docker container run -i --rm --net host \
-v "$(pwd)/regbot.yml:/home/appuser/regbot.yml" \
regclient/regbot:latest -c /home/appuser/regbot.yml once --dry-run
ghcr.io/regclient/regbot:latest -c /home/appuser/regbot.yml once --dry-run
```
Or on Linux and Mac environments, you can run `regctl` as your own user and save
@ -64,7 +64,7 @@ configuration settings, use docker credentials, and use any docker certs:
docker container run -i --rm --net host \
-u "$(id -u):$(id -g)" -e HOME -v $HOME:$HOME \
-v /etc/docker/certs.d:/etc/docker/certs.d:ro \
regclient/regctl:latest --help
ghcr.io/regclient/regctl:latest --help
```
And `regctl` can be packaged as a shell script with:
@ -79,7 +79,7 @@ esac
docker container run \$opts -i --rm --net host \\
-u "\$(id -u):\$(id -g)" -e HOME -v \$HOME:\$HOME \\
-v /etc/docker/certs.d:/etc/docker/certs.d:ro \\
regclient/regctl:latest "\$@"
ghcr.io/regclient/regctl:latest "\$@"
EOF
chmod 755 regctl
./regctl --help
@ -98,7 +98,7 @@ For images:
cosign verify \
--certificate-oidc-issuer https://token.actions.githubusercontent.com \
--certificate-identity-regexp https://github.com/regclient/regclient/.github/workflows/ \
regclient/regctl:latest
ghcr.io/regclient/regctl:latest
```
For binaries:
@ -132,19 +132,19 @@ make oci-image
# compare regctl digests to edge/main
regctl image digest ocidir://output/regctl:scratch
regctl image digest regclient/regctl:edge
regctl image digest ghcr.io/regclient/regctl:edge
regctl image digest ocidir://output/regctl:alpine
regctl image digest regclient/regctl:edge-alpine
regctl image digest ghcr.io/regclient/regctl:edge-alpine
# compare regsync digests to edge/main
regctl image digest ocidir://output/regsync:scratch
regctl image digest regclient/regsync:edge
regctl image digest ghcr.io/regclient/regsync:edge
regctl image digest ocidir://output/regsync:alpine
regctl image digest regclient/regsync:edge-alpine
regctl image digest ghcr.io/regclient/regsync:edge-alpine
# compare regbot digests to edge/main
regctl image digest ocidir://output/regbot:scratch
regctl image digest regclient/regbot:edge
regctl image digest ghcr.io/regclient/regbot:edge
regctl image digest ocidir://output/regbot:alpine
regctl image digest regclient/regbot:edge-alpine
regctl image digest ghcr.io/regclient/regbot:edge-alpine
```

View File

@ -221,7 +221,7 @@ esac
docker container run \$opts -i --rm --net host \\
-u "\$(id -u):\$(id -g)" -e HOME -v \$HOME:\$HOME \\
-v /etc/docker/certs.d:/etc/docker/certs.d:ro \\
regclient/regctl:latest "\$@"
ghcr.io/regclient/regctl:latest "\$@"
EOF
chmod 755 regctl
./regctl registry set --tls disabled localhost:5000
@ -230,12 +230,12 @@ chmod 755 regctl
## Load example images
Copy some images to the local registry that have the specified label to see the
"delete old builds" action work. The `regclient/regctl` image includes these
"delete old builds" action work. The `ghcr.io/regclient/regctl` image includes these
labels, and we can also use `regctl` itself to copy these images.
```shell
./regctl image copy -v info \
regclient/regctl:v0.0.1 localhost:5000/regclient/example:latest \
ghcr.io/regclient/regctl:v0.0.1 localhost:5000/regclient/example:latest \
&& \
./regctl image copy -v info \
localhost:5000/regclient/example:latest localhost:5000/regclient/example:ci-001 \
@ -276,7 +276,7 @@ docker container run -i --rm --net registry \
-e "HUB_USER" \
-v "${HOME}/.docker/hub_token:/var/run/secrets/hub_token:ro" \
-v "$(pwd)/regbot.yml:/home/appuser/regbot.yml" \
regclient/regbot:latest -c /home/appuser/regbot.yml once --dry-run
ghcr.io/regclient/regbot:latest -c /home/appuser/regbot.yml once --dry-run
```
## Run the Scripts Now
@ -291,7 +291,7 @@ docker container run -i --rm --net registry \
-e "HUB_USER" \
-v "${HOME}/.docker/hub_token:/var/run/secrets/hub_token:ro" \
-v "$(pwd)/regbot.yml:/home/appuser/regbot.yml" \
regclient/regbot:latest -c /home/appuser/regbot.yml once
ghcr.io/regclient/regbot:latest -c /home/appuser/regbot.yml once
```
## Run the Scripts on a Schedule
@ -304,7 +304,7 @@ docker container run -d --restart=unless-stopped --name regbot --net registry \
-e "HUB_USER" \
-v "${HOME}/.docker/hub_token:/var/run/secrets/hub_token:ro" \
-v "$(pwd)/regbot.yml:/home/appuser/regbot.yml" \
regclient/regbot:latest -c /home/appuser/regbot.yml server -v debug
ghcr.io/regclient/regbot:latest -c /home/appuser/regbot.yml server -v debug
```
## Inspect using regctl

View File

@ -79,7 +79,7 @@ scripts:
Array of registry credentials and settings for connecting.
To avoid saving credentials in the same file with the other settings, consider using the `${HOME}/.docker/config.json` or a template in the `user` and `pass`
fields to expand a variable or file contents.
When using the `regclient/regbot` image, the docker config is read from `/home/appuser/.docker/config.json`.
When using the `ghcr.io/regclient/regbot` image, the docker config is read from `/home/appuser/.docker/config.json`.
Each `creds` entry supports the following options:
- `registry`:
Hostname and port of the registry server used in image references.

View File

@ -72,7 +72,7 @@ With docker installed and logged into the registry, these commands are typically
The `regctl` will import credentials from the docker logins stored in `$HOME/.docker/config.json` and trust certificates loaded in `/etc/docker/certs.d/$registry/*.crt`.
These commands are useful for running in an environment without docker to configure the `$HOME/.regctl/config.json` file.
One use case for that is to run `regctl` within an unpriviliged container in a CI pipeline.
With the `regclient/regctl` image, the docker configuration is pulled from `/home/appuser/.docker/config.json` by default.
With the `ghcr.io/regclient/regctl` image, the docker configuration is pulled from `/home/appuser/.docker/config.json` by default.
Note that it is possible to configure multiple registry servers under a single name as a mirror with automatic failover.
This is useful for pulling content, but pushes will still be sent to the upstream registry server.

View File

@ -44,7 +44,7 @@ sync:
- "latest"
- "3"
- "3.\\d+"
- source: regclient/regctl:latest
- source: ghcr.io/regclient/regctl:latest
target: registry:5000/regclient/regctl:latest
type: image
```
@ -67,7 +67,7 @@ docker container run -i --rm --net registry \
-v "$(pwd)/regsync.yml:/home/appuser/regsync.yml:ro" \
-v "${HOME}/.docker/hub_token:/home/appuser/.docker/hub_token:ro" \
-e "HUB_USER" \
regclient/regsync:latest -c /home/appuser/regsync.yml once
ghcr.io/regclient/regsync:latest -c /home/appuser/regsync.yml once
```
## Run regsync
@ -79,7 +79,7 @@ docker container run -d --restart=unless-stopped --name regsync --net registry \
-v "$(pwd)/regsync.yml:/home/appuser/regsync.yml:ro" \
-v "$(pwd)/hub_token:/var/run/secrets/hub_token:ro" \
-e "HUB_USER" \
regclient/regsync:latest -c /home/appuser/regsync.yml server
ghcr.io/regclient/regsync:latest -c /home/appuser/regsync.yml server
```
You can verify it started by checking the logs with `docker container logs
@ -130,7 +130,7 @@ esac
docker container run \$opts -i --rm --net host \\
-u "\$(id -u):\$(id -g)" -e HOME -v \$HOME:\$HOME \\
-v /etc/docker/certs.d:/etc/docker/certs.d:ro \\
regclient/regctl:latest "\$@"
ghcr.io/regclient/regctl:latest "\$@"
EOF
chmod 755 regctl
./regctl registry set --tls disabled localhost:5000

View File

@ -89,7 +89,7 @@ sync:
Array of registry credentials and settings for connecting.
To avoid saving credentials in the same file with the other settings, consider using the `${HOME}/.docker/config.json` or a template in the `user` and `pass`
fields to expand a variable or file contents.
When using the `regclient/regsync` image, the docker config is read from `/home/appuser/.docker/config.json`.
When using the `ghcr.io/regclient/regsync` image, the docker config is read from `/home/appuser/.docker/config.json`.
Each `creds` entry supports the following options:
- `registry`:
Hostname and port of the registry server used in image references.