4

#gitlab 开启docker registry镜像库功能

 2 years ago
source link: https://xmanyou.com/gitlab-enable-docker-registry/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
9 March 2021 / gitlab

#gitlab 开启docker registry镜像库功能

gitlab是自带docker registry模块的,但是默认是关闭的。

没开启之前,在项目的web管理界面上,看到是这样子。
gitlab-enable-docker-registry-01

  • 1). 修改gitlab.rb
registry_external_url 'http://127.0.0.1:4567'
  • 2). 如果是用docker-compose运行的gitlab,可以添加GITLAB_OMNIBUS_CONFIG环境变量
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        registry_external_url 'http://127.0.0.1:4567'

修改后,重启gitlab。

成功开启的话,可以在项目的管理界面上找到:容器镜像库

gitlab-enable-docker-registry-02

阿斌

Read more posts by this author.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK