Bash read values and assign to variables
Read into array
read -r -a array <<< $line
echo ${array[3]}
Read into individual variables
read var0 var1 var2 var3 <<< $line
echo $var3
Read and format
awk '{print $2 "-" $3}' <<< $line
read -r -a array <<< $line
echo ${array[3]}
read var0 var1 var2 var3 <<< $line
echo $var3
awk '{print $2 "-" $3}' <<< $line
JFrog artifactory contains many feature, such as git, docker, etc.
https://jfrog.com/open-source/#artifactory
Docker image can be pulled via docker command
docker pull releases-docker.jfrog.io/jfrog/artifactory-oss:latest
Docker compose can be found in download url as well.
After docker containers are backed up daily to docker registry, clean up process is required.
Note: If the image without tag, and if it can be found client locately, then can run command docker inspect
to find out. Otherwise, can check "Run command from server" section find out.
_catalog
(repositries)Following curl command can be used to display all _catalog
(repositries).
curl https://username:password@registry.example.net/v2/_catalog
Following curl command can be used to display tags for specific repo
curl https://username:password@registry.example.net/v2/${repo}/tags/list
Use pull image command to get digest as below.
docker pull registry.example.net/${repo}:20210624
20210624: Pulling from user/host/dnsmasq
...
22b5d63ad977: Already exists
8e2e66517d7e: Pull complete
Digest: sha256:7535af1f65524f9200b901fc31b9c779819e45c0502ef99605666842a319908f
Using delete local image action also can get digest as well
docker rmi registry.example.net/${repo}:20210619
# Untagged: registry.example.net/user/host/dnsmasq:20210619
# Untagged: registry.example.net/user/host/dnsmasq@sha256:e300ff463dc18c7b3bf3964dc5a9832f613d829285a0da49e5fd37519dc7d0fc
# Deleted: sha256:35baba3d5948b5844b67adcd6a236905039e929f8647d4e4afc9e64e9460d557
# Deleted: sha256:bd681f3956f55dc028bae7ca4c2657457824a0e356c59705302fb084660a669b
The Digest is the second tag.
Note: The first deleted sha256 allowed to be deleted too, but not the second deleted. Don't understand why
Run following command to get Digest
curl -v --silent -H "Accept: application/vnd.docker.distribution.manifest.v2+json" -X GET https://username:password@registry.example.net/v2/${repo}/manifests/20210624 2>&1 | grep Docker-Content-Digest | awk '{print ($3)}'
This is usefull if there is no image at client and no tag for specfic image.
docker exec privateregistry_registry_1 bin/registry garbage-collect --dry-run /etc/docker/registry/config.yml | grep '${repo}: marking manifest' | awk '{print $4}'
curl https://username:password@registry.example.net/v2/${repo}/manifests/sha256:xxxxxxxxxxxxxxxx
curl -X DELETE https://username:password@registry.example.net/v2/${repo}/manifests/sha256:xxxxxxxxxxxxxxxx
_catalog
The v2 registry doesn't allow deleting only certain tags from an image, and deletion of tags is in an open PR for a future version of the Registry (https://github.com/docker/distribution/pull/2169).
rm -rf docker/registry/v2/repositories/${repo}/
*Note: After delete, garbage-collect, restart, the repo is still reporting out as empty _catalog
.
Login to registry server and run following command
docker exec registry bin/registry garbage-collect --delete-untagged /etc/docker/registry/config.yml
If the repo is still listed in the output, need to delete them too.
docker restart registry
Docker Private Registry - Deleted all images, but still showing in catalog
Clean Up Your Docker Registry
Delete repository from v2 private registry
Pull Request - New Tags API #2169
Docker Registry HTTP API V2
Morefine S500+ Using RTX 3080 TI
M.2 PCIe x4 to External eGPU - Faster than TB3 eGPU's
ADT-link R43SG M.2 PCIe 3.0 x4 / NVMe to external GPU review. Cards tested GTX 1060 6GB & GTX 1080 Ti. Where to buy: http://s.click.aliexpress.com/e/INILpRw
8750H mini PC with 2 x M.2 NMVe slots: http://s.click.aliexpress.com/e/bpWvyIlE