Frequently Asked Question
Manually Building and Pushing Containers
Last Updated 10 months ago
When would I have to do this?
- When the Gitlab Runners are down or failing due to a Gitlab internal problem
- You need to override an image tag that wouldn't otherwise be pushed by CI
How do I do this?
Login to the gitlab registry. Create a personal access token in gitlab with full API access:
Then, on your terminal run
docker login registry.gitlab.comand provide the credentials that Gitlab generated.
You can then build the container from the project path with:
docker build -t registry.gitlab.com/[project name]/[container name]:[tag] .You can find the full URL to put after the -t in the Registry section of the project.
Then you can push the image by running:
docker push registry.gitlab.com/[project name]/[container name]:[tag]A similar version of this guide is on the Registry page of every Gitlab project.