GitLab has launched new software for setting up a Docker container registry within the GitLab development lifecycle stack, potentially making it easier for GitLab users to build, test, and deploy Docker container images.
GitLab’s new Docker registry GitLab Container Registry is available in both GitLab CE (Community Edition) and GitLab EE (Enterprise Edition). GitLab is free software providing Git repository management, code reviews, issue tracking, activity feeds and wikis.
The open source GitLab Container Register For Docker easily integrates with the rest of GitLab services.
“Developers may want to maintain their own registry for private, company images, or for throw-away images used only in testing. Using GitLab Container Registry means you don’t need to set up and administer yet another service, or use a public registry, wrote Mark Pundsack, head of product at GitLab, in a blog post. The option to set up a container registry comes with the latest version of GitLab, version 8.8.1, released Monday.
Before this release, a typical company using Git had a repository hosting, infrastructure build, and a container image registry for each project, Pundsack said. Three separate applications for the company to license, configure, connect and maintain. Every new project required configuring all these applications from scratch.
Also, the rise of microservices makes it necessary for companies to manage even more repositories.
The GitLab repository manager simplifies this setup, by offering an integrated container image registry that fully integrates container development into the application development lifecycle.
How To Make It Go
In a smooth system, Docker containers, after they are created are automatically and updated whenever code changes. The Docker Registry is a place to store and tag images so when you call docker run it knows which image to call.
Using the new GitLab Container Registry eliminates the need to set up and administer yet another service, or use a public registry. It also gives developers flexibility in maintaining their registry for private, company images, or for images used only for testing.
This registry contains user authentication, so all user and group definitions are respected. Repositories are already defined in the registry. Projects are likewise already defined in GitLab. While every project can have an image
Here’s an example GitLab CI configuration file (
.gitlab-ci.yml) which builds an image, tags and uploads the build to the container registry.
- docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN gitlab.com:5005
- docker build -t my-group/my-project .
- docker run my-group/my-project /script/to/run/tests
- docker tag my-group/my-project gitlab.com:5005/my-group/my-project:latest
- docker push gitlab.com:5005/my-group/my-project:latest
Docker is a sponsor of The New Stack
Feature Image: TC Currie
The New Stack is a wholly owned subsidiary of Insight Partners. TNS owner Insight Partners is an investor in the following companies: Docker.