2016-06-02 11:05:42 +05:30
|
|
|
- page_title "Container Registry"
|
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
.row.prepend-top-default.append-bottom-default
|
|
|
|
.col-lg-3
|
|
|
|
%h4.prepend-top-0
|
|
|
|
= page_title
|
2016-06-02 11:05:42 +05:30
|
|
|
%p
|
2017-09-10 17:25:29 +05:30
|
|
|
With the Docker Container Registry integrated into GitLab, every project
|
|
|
|
can have its own space to store its Docker images.
|
|
|
|
%p.append-bottom-0
|
|
|
|
= succeed '.' do
|
|
|
|
Learn more about
|
|
|
|
= link_to 'Container Registry', help_page_path('user/project/container_registry'), target: '_blank'
|
|
|
|
|
|
|
|
.col-lg-9
|
|
|
|
.panel.panel-default
|
|
|
|
.panel-heading
|
|
|
|
%h4.panel-title
|
|
|
|
How to use the Container Registry
|
|
|
|
.panel-body
|
|
|
|
%p
|
|
|
|
First log in to GitLab’s Container Registry using your GitLab username
|
|
|
|
and password. If you have
|
|
|
|
= link_to '2FA enabled', help_page_path('user/profile/account/two_factor_authentication'), target: '_blank'
|
|
|
|
you need to use a
|
|
|
|
= succeed ':' do
|
|
|
|
= link_to 'personal access token', help_page_path('user/profile/account/two_factor_authentication', anchor: 'personal-access-tokens'), target: '_blank'
|
|
|
|
%pre
|
2016-06-02 11:05:42 +05:30
|
|
|
docker login #{Gitlab.config.registry.host_port}
|
|
|
|
%br
|
2017-09-10 17:25:29 +05:30
|
|
|
%p
|
|
|
|
Once you log in, you’re free to create and upload a container image
|
|
|
|
using the common
|
|
|
|
%code build
|
|
|
|
and
|
|
|
|
%code push
|
|
|
|
commands:
|
|
|
|
%pre
|
|
|
|
:plain
|
|
|
|
docker build -t #{escape_once(@project.container_registry_url)} .
|
|
|
|
docker push #{escape_once(@project.container_registry_url)}
|
2016-06-02 11:05:42 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
%hr
|
|
|
|
%h5.prepend-top-default
|
|
|
|
Use different image names
|
|
|
|
%p.light
|
|
|
|
GitLab supports up to 3 levels of image names. The following
|
|
|
|
examples of images are valid for your project:
|
|
|
|
%pre
|
|
|
|
:plain
|
|
|
|
#{escape_once(@project.container_registry_url)}:tag
|
|
|
|
#{escape_once(@project.container_registry_url)}/optional-image-name:tag
|
|
|
|
#{escape_once(@project.container_registry_url)}/optional-name/optional-image-name:tag
|
2016-06-02 11:05:42 +05:30
|
|
|
|
2017-09-10 17:25:29 +05:30
|
|
|
- if @images.blank?
|
|
|
|
%p.settings-message.text-center.append-bottom-default
|
|
|
|
No container images stored for this project. Add one by following the
|
|
|
|
instructions above.
|
|
|
|
- else
|
|
|
|
= render partial: 'image', collection: @images
|