Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/glensc/docker-create-tag
Create Docker image tag using Registry v2 API
https://github.com/glensc/docker-create-tag
api bash bash-script cli curl docker gitlab image registry sh shell tag v2
Last synced: 3 days ago
JSON representation
Create Docker image tag using Registry v2 API
- Host: GitHub
- URL: https://github.com/glensc/docker-create-tag
- Owner: glensc
- License: bsd-2-clause
- Created: 2018-10-11T16:28:31.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-23T10:08:40.000Z (over 5 years ago)
- Last Synced: 2024-11-24T04:25:11.136Z (2 months ago)
- Topics: api, bash, bash-script, cli, curl, docker, gitlab, image, registry, sh, shell, tag, v2
- Language: Shell
- Homepage:
- Size: 14.6 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Create Docker image tag using Registry v2 API
Creates docker registry tags without requiring locally running Docker Daemon using Docker Registry v2 API.
This is known to work within same registry server.
Tested with GitLab CI:
```yml
variables:
CONTAINER_BUILD_IMAGE: $CI_REGISTRY_IMAGE/builds:$CI_PIPELINE_ID-$CI_COMMIT_REF_SLUG
CONTAINER_PRODUCTION_IMAGE: $CI_REGISTRY_IMAGE/production:$CI_PIPELINE_ID-$CI_COMMIT_REF_SLUGdeploy:
when: manual
script:
- docker-create-tag -u gitlab-ci-token -p $CI_JOB_TOKEN $CONTAINER_BUILD_IMAGE $CONTAINER_PRODUCTION_IMAGE
```
Alternatively, you can rely on `docker login` storing credentials to `~/.docker/config.json````yml
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- docker-create-tag $CONTAINER_BUILD_IMAGE $CONTAINER_PRODUCTION_IMAGE
```## History
This project was created due [reg] tool [lacking the support][reg#88].
[reg]: https://github.com/genuinetools/reg
[reg#88]: https://github.com/genuinetools/reg/issues/88