Feedback

Chat Icon

Cloud Native CI/CD with GitLab

From Commit to Production Ready

GitLab Container Registry
22%

Push a Docker Image to GitLab Container Registry

To push our Docker image, you need to tag it with the registry URL. Example, we will use the v0 tag:

# cd to the directory where the Dockerfile is located
cd $HOME/todo/app
# Build the Docker image
docker build \
-t registry.gitlab.com/$GITLAB_GROUP/$GITLAB_PROJECT:v0 .

We already exported the GITLAB_GROUP and GITLAB_PROJECT environment variables in the previous sections.

Push the image to the registry:

Cloud Native CI/CD with GitLab

From Commit to Production Ready

Enroll now to unlock all content and receive all future updates for free.