{"id":396503,"date":"2024-06-29T12:52:47","date_gmt":"2024-06-29T12:52:47","guid":{"rendered":"http:\/\/savepearlharbor.com\/?p=396503"},"modified":"-0001-11-30T00:00:00","modified_gmt":"-0001-11-29T21:00:00","slug":"","status":"publish","type":"post","link":"https:\/\/savepearlharbor.com\/?p=396503","title":{"rendered":"<span>\u041d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u0435\u043c GitLab Container Registry<\/span>"},"content":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/getpro\/habr\/upload_files\/891\/267\/c4e\/891267c4e1e3739d7b51a7f5135c69fb.png\" width=\"1280\" height=\"720\" data-src=\"https:\/\/habrastorage.org\/getpro\/habr\/upload_files\/891\/267\/c4e\/891267c4e1e3739d7b51a7f5135c69fb.png\"\/><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0435\u0435\u0441\u0442\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 GitLab Container Registry, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0437\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c NGINX. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d GitLab \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u043a\u0435\u0442\u0430 Omnibus. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, Container Registry \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0434\u043e\u043c\u0435\u043d\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0430\u043c GitLab, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0431\u043e\u0442\u044b GitLab \u0437\u0430 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0432 GitLab Nginx.<\/p>\n<p>\u0420\u0435\u0435\u0441\u0442\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: registry.example.com. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0410 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0432 DNS. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code>server {     listen       80;     server_name  registry.example.com;      #return 301 https:\/\/$host$request_uri;      root \/usr\/share\/nginx\/html;      location \/ {         deny all;     }      location ^~ \/.well-known {         default_type 'text\/plain';         allow all;     }      error_log   \/var\/log\/nginx\/registry_example_com_error.log error;     access_log  \/var\/log\/nginx\/registry_example_com_access.log; }<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442 Let\u2019s Encrypt \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 webroot:<\/p>\n<pre><code>certbot certonly -a webroot -w \/usr\/share\/nginx\/html -d registry.example.com<\/code><\/pre>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043e\u043c\u0435\u043d\u0430 \u0440\u0435\u0435\u0441\u0442\u0440\u0430. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0443 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u0440\u0442 &#171;registry_nginx&#187; \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 https:<\/p>\n<pre><code>server {     listen       443 ssl;     server_name  registry.example.com;      ssl_certificate \/etc\/letsencrypt\/live\/registry.example.com\/fullchain.pem;     ssl_certificate_key \/etc\/letsencrypt\/live\/registry.example.com\/privkey.pem;      ssl_protocols TLSv1.2 TLSv1.3;     ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;     ssl_prefer_server_ciphers off;     ssl_session_cache shared:SSL:10m;      client_max_body_size 2000M;     chunked_transfer_encoding on;      root \/usr\/share\/nginx\/html;      location \/ {         proxy_pass http:\/\/192.168.0.10:8090;         proxy_read_timeout      300;         proxy_connect_timeout   300;         proxy_redirect          off;         proxy_set_header        X-Forwarded-Proto https;         proxy_set_header        Host              $http_host;         proxy_set_header        X-Real-IP         $remote_addr;         proxy_set_header        X-Forwarded-For   $proxy_add_x_forwarded_for;         proxy_set_header        X-Forwarded-Ssl   on;     }      location ^~ \/.well-known {         default_type 'text\/plain';         allow all;     }      error_log   \/var\/log\/nginx\/registry_example_com_ssl_error.log error;     access_log  \/var\/log\/nginx\/registry_example_com_ssl_access.log; }<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 nginx:<\/p>\n<pre><code>nginx -t nginx -s reload<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043d\u043e\u0441\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 GitLab. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#171;GitLab Container Registry&#187; \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u041e\u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c &#171;Omnibus&#187;, \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 &#171;registry_external_url&#187;.<\/p>\n<pre><code># cat \/etc\/gitlab\/gitlab.rb registry_external_url 'https:\/\/registry.example.com' gitlab_rails['registry_enabled'] = true registry['enable'] = true registry_nginx['enable'] = true registry_nginx['proxy_set_headers'] = {   \"Host\" => \"$http_host\",   \"X-Real-IP\" => \"$remote_addr\",   \"X-Forwarded-For\" => \"$proxy_add_x_forwarded_for\",   \"X-Forwarded-Proto\" => \"https\",   \"X-Forwarded-Ssl\" => \"on\" } registry_nginx['listen_port'] = 8090 registry_nginx['listen_https'] = false<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 GitLab:<\/p>\n<pre><code>gitlab-ctl reconfigure<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u043e\u0431\u0440\u0430\u0437\u0430:<\/p>\n<pre><code>docker login registry.example.com docker build -t registry.example.com\/test\/test-1 . docker push registry.example.com\/test\/test-1<\/code><\/pre>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<\/p>\n<p><a href=\"https:\/\/medium.com\/@s.petrushin\/%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-gitlab-container-registry-c9ae3fb8a35\">https:\/\/medium.com\/@s.petrushin\/%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-gitlab-container-registry-c9ae3fb8a35<\/a> <\/p>\n<p><a href=\"https:\/\/serveradmin.ru\/gitlab-container-registry-za-nginx-reverse-proxy\/\">https:\/\/serveradmin.ru\/gitlab-container-registry-za-nginx-reverse-proxy\/<\/a> <\/p>\n<blockquote>\n<p><a href=\"https:\/\/t.me\/timewebru\"><strong>\u041d\u043e\u0432\u043e\u0441\u0442\u0438, \u043e\u0431\u0437\u043e\u0440\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Timeweb.Cloud &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u043a\u0430\u043d\u0430\u043b\u0435<\/strong><\/a> <strong>\u21a9<\/strong><\/p>\n<\/blockquote>\n<figure class=\"full-width\"><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/habrastorage.org\/r\/w1560\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\" alt=\"\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c\" title=\"\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c\" width=\"1560\" height=\"563\" data-src=\"https:\/\/habrastorage.org\/webt\/b5\/pj\/of\/b5pjofdoxth14ro-rjsrn7sbmiy.png\"\/><\/p>\n<div><figcaption><a href=\"https:\/\/timeweb.cloud\/?i=106909\"><em>\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c<\/em><\/a><\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/589675\/\"> https:\/\/habr.com\/ru\/articles\/589675\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<div><!--[--><!--]--><\/div>\n<div id=\"post-content-body\">\n<div>\n<div class=\"article-formatted-body article-formatted-body article-formatted-body_version-2\">\n<div xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<figure class=\"full-width\"><\/figure>\n<p>\u0412 \u044d\u0442\u043e\u0439 \u0441\u0442\u0430\u0442\u044c\u0435 \u043c\u044b \u0440\u0430\u0441\u0441\u043c\u043e\u0442\u0440\u0438\u043c, \u043a\u0430\u043a \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u0440\u0435\u0435\u0441\u0442\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 GitLab Container Registry, \u043d\u0430\u0445\u043e\u0434\u044f\u0449\u0438\u0439\u0441\u044f \u0437\u0430 \u043e\u0431\u0440\u0430\u0442\u043d\u044b\u043c \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c NGINX. \u041f\u0440\u0435\u0434\u043f\u043e\u043b\u0430\u0433\u0430\u0435\u0442\u0441\u044f, \u0447\u0442\u043e \u0443 \u0432\u0430\u0441 \u0443\u0436\u0435 \u0443\u0441\u0442\u0430\u043d\u043e\u0432\u043b\u0435\u043d GitLab \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u0430\u043a\u0435\u0442\u0430 Omnibus. \u0421\u043e\u0433\u043b\u0430\u0441\u043d\u043e \u0434\u043e\u043a\u0443\u043c\u0435\u043d\u0442\u0430\u0446\u0438\u0438, Container Registry \u043c\u043e\u0436\u043d\u043e \u043d\u0430\u0441\u0442\u0440\u043e\u0438\u0442\u044c \u043d\u0430 \u0442\u043e\u043c \u0436\u0435 \u0434\u043e\u043c\u0435\u043d\u0435, \u043d\u0430 \u043a\u043e\u0442\u043e\u0440\u043e\u043c \u0440\u0430\u0431\u043e\u0442\u0430\u0435\u0442 \u0441\u0430\u043c GitLab, \u043d\u043e \u0432 \u0441\u043b\u0443\u0447\u0430\u0435 \u0440\u0430\u0431\u043e\u0442\u044b GitLab \u0437\u0430 \u043f\u0440\u043e\u043a\u0441\u0438 \u0441\u0435\u0440\u0432\u0435\u0440\u043e\u043c, \u043d\u0435\u043e\u0431\u0445\u043e\u0434\u0438\u043c\u043e \u0437\u0430\u0432\u0435\u0441\u0442\u0438 \u043e\u0442\u0434\u0435\u043b\u044c\u043d\u044b\u0439 \u0434\u043e\u043c\u0435\u043d \u0434\u043b\u044f \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u043e\u0431\u0440\u0430\u0437\u043e\u0432, \u0447\u0442\u043e\u0431\u044b \u0438\u0437\u0431\u0435\u0436\u0430\u0442\u044c \u043a\u043e\u043d\u0444\u043b\u0438\u043a\u0442\u0430 \u0434\u043e\u043c\u0435\u043d\u043d\u044b\u0445 \u0438\u043c\u0435\u043d \u043f\u0440\u0438 \u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0435 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u044b\u0445 \u0445\u043e\u0441\u0442\u043e\u0432 \u0432 GitLab Nginx.<\/p>\n<p>\u0420\u0435\u0435\u0441\u0442\u0440 \u043e\u0431\u0440\u0430\u0437\u043e\u0432 \u0431\u0443\u0434\u0435\u0442 \u0434\u043e\u0441\u0442\u0443\u043f\u0435\u043d \u043f\u043e \u0430\u0434\u0440\u0435\u0441\u0443: registry.example.com. \u0414\u043e\u0431\u0430\u0432\u043b\u044f\u0435\u043c \u0410 \u0437\u0430\u043f\u0438\u0441\u044c \u0434\u043b\u044f \u0434\u043e\u043c\u0435\u043d\u0430 \u0440\u0435\u0435\u0441\u0442\u0440\u0430 \u0432 DNS. \u041f\u0440\u0438\u0432\u043e\u0434\u0438\u043c \u043a\u043e\u043d\u0444\u0438\u0433 \u0432\u0438\u0440\u0442\u0443\u0430\u043b\u044c\u043d\u043e\u0433\u043e \u0445\u043e\u0441\u0442\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u043e\u0431\u0440\u0430\u0442\u043d\u043e\u0433\u043e \u043f\u0440\u043e\u043a\u0441\u0438 \u043a \u0441\u043b\u0435\u0434\u0443\u044e\u0449\u0435\u043c\u0443 \u0432\u0438\u0434\u0443:<\/p>\n<pre><code>server {     listen       80;     server_name  registry.example.com;      #return 301 https:\/\/$host$request_uri;      root \/usr\/share\/nginx\/html;      location \/ {         deny all;     }      location ^~ \/.well-known {         default_type 'text\/plain';         allow all;     }      error_log   \/var\/log\/nginx\/registry_example_com_error.log error;     access_log  \/var\/log\/nginx\/registry_example_com_access.log; }<\/code><\/pre>\n<p>\u041f\u043e\u043b\u0443\u0447\u0430\u0435\u043c \u0432\u0430\u043b\u0438\u0434\u043d\u044b\u0439 \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442 \u043e\u0442 Let\u2019s Encrypt \u0441 \u043f\u043e\u043c\u043e\u0449\u044c\u044e \u043f\u043b\u0430\u0433\u0438\u043d\u0430 webroot:<\/p>\n<pre><code>certbot certonly -a webroot -w \/usr\/share\/nginx\/html -d registry.example.com<\/code><\/pre>\n<p>\u0414\u043e\u043f\u043e\u043b\u043d\u044f\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0434\u043e\u043c\u0435\u043d\u0430 \u0440\u0435\u0435\u0441\u0442\u0440\u0430. \u0423\u043a\u0430\u0437\u044b\u0432\u0430\u0435\u043c \u043f\u0443\u0442\u044c \u043a \u0441\u0435\u0440\u0442\u0438\u0444\u0438\u043a\u0430\u0442\u0443 \u0438 \u043f\u0440\u0438\u0432\u0430\u0442\u043d\u043e\u043c\u0443 \u043a\u043b\u044e\u0447\u0443, \u043a\u043e\u0442\u043e\u0440\u044b\u0439 \u043c\u044b \u043f\u043e\u043b\u0443\u0447\u0438\u043b\u0438 \u0440\u0430\u043d\u0435\u0435. \u0422\u0430\u043a\u0436\u0435 \u043f\u0440\u043e\u043a\u0441\u0438\u0440\u0443\u0435\u043c \u0437\u0430\u043f\u0440\u043e\u0441\u044b \u043d\u0430 \u043f\u043e\u0440\u0442 &#171;registry_nginx&#187; \u0438 \u043d\u0435 \u0437\u0430\u0431\u044b\u0432\u0430\u0435\u043c \u0432\u043a\u043b\u044e\u0447\u0438\u0442\u044c \u043f\u043e\u0441\u0442\u043e\u044f\u043d\u043d\u044b\u0439 \u0440\u0435\u0434\u0438\u0440\u0435\u043a\u0442 \u043d\u0430 https:<\/p>\n<pre><code>server {     listen       443 ssl;     server_name  registry.example.com;      ssl_certificate \/etc\/letsencrypt\/live\/registry.example.com\/fullchain.pem;     ssl_certificate_key \/etc\/letsencrypt\/live\/registry.example.com\/privkey.pem;      ssl_protocols TLSv1.2 TLSv1.3;     ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;     ssl_prefer_server_ciphers off;     ssl_session_cache shared:SSL:10m;      client_max_body_size 2000M;     chunked_transfer_encoding on;      root \/usr\/share\/nginx\/html;      location \/ {         proxy_pass http:\/\/192.168.0.10:8090;         proxy_read_timeout      300;         proxy_connect_timeout   300;         proxy_redirect          off;         proxy_set_header        X-Forwarded-Proto https;         proxy_set_header        Host              $http_host;         proxy_set_header        X-Real-IP         $remote_addr;         proxy_set_header        X-Forwarded-For   $proxy_add_x_forwarded_for;         proxy_set_header        X-Forwarded-Ssl   on;     }      location ^~ \/.well-known {         default_type 'text\/plain';         allow all;     }      error_log   \/var\/log\/nginx\/registry_example_com_ssl_error.log error;     access_log  \/var\/log\/nginx\/registry_example_com_ssl_access.log; }<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u0438 \u043f\u0435\u0440\u0435\u0447\u0438\u0442\u044b\u0432\u0430\u0435\u043c \u043a\u043e\u043d\u0444\u0438\u0433 nginx:<\/p>\n<pre><code>nginx -t nginx -s reload<\/code><\/pre>\n<p>\u0422\u0435\u043f\u0435\u0440\u044c \u0432\u043d\u043e\u0441\u0438\u043c \u0438\u0437\u043c\u0435\u043d\u0435\u043d\u0438\u044f \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u044e \u0441\u0435\u0440\u0432\u0435\u0440\u0430 GitLab. \u041f\u043e \u0443\u043c\u043e\u043b\u0447\u0430\u043d\u0438\u044e \u043f\u043e\u0434\u0441\u0438\u0441\u0442\u0435\u043c\u0430 &#171;GitLab Container Registry&#187; \u043e\u0442\u043a\u043b\u044e\u0447\u0435\u043d\u0430. \u041e\u043d\u0430 \u0430\u043a\u0442\u0438\u0432\u0438\u0440\u0443\u0435\u0442\u0441\u044f, \u043f\u043e\u043b\u043d\u043e\u0441\u0442\u044c\u044e \u0430\u0432\u0442\u043e\u043c\u0430\u0442\u0438\u0447\u0435\u0441\u043a\u0438 \u043d\u0430\u0441\u0442\u0440\u0430\u0438\u0432\u0430\u044f\u0441\u044c \u043e\u0440\u043a\u0435\u0441\u0442\u0440\u0430\u0442\u043e\u0440\u043e\u043c &#171;Omnibus&#187;, \u043f\u0440\u0438 \u043e\u0431\u043d\u0430\u0440\u0443\u0436\u0435\u043d\u0438\u0438 \u0432 \u043a\u043e\u043d\u0444\u0438\u0433\u0443\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u043e\u043c \u0444\u0430\u0439\u043b\u0435 \u043f\u0430\u0440\u0430\u043c\u0435\u0442\u0440\u0430 &#171;registry_external_url&#187;.<\/p>\n<pre><code># cat \/etc\/gitlab\/gitlab.rb registry_external_url 'https:\/\/registry.example.com' gitlab_rails['registry_enabled'] = true registry['enable'] = true registry_nginx['enable'] = true registry_nginx['proxy_set_headers'] = {   \"Host\" => \"$http_host\",   \"X-Real-IP\" => \"$remote_addr\",   \"X-Forwarded-For\" => \"$proxy_add_x_forwarded_for\",   \"X-Forwarded-Proto\" => \"https\",   \"X-Forwarded-Ssl\" => \"on\" } registry_nginx['listen_port'] = 8090 registry_nginx['listen_https'] = false<\/code><\/pre>\n<p>\u0417\u0430\u043f\u0443\u0441\u043a\u0430\u0435\u043c \u043f\u0435\u0440\u0435\u043d\u0430\u0441\u0442\u0440\u043e\u0439\u043a\u0443 GitLab:<\/p>\n<pre><code>gitlab-ctl reconfigure<\/code><\/pre>\n<p>\u041f\u0440\u043e\u0432\u0435\u0440\u044f\u0435\u043c \u043d\u0430 \u043a\u043b\u0438\u0435\u043d\u0442\u0435 \u0430\u0443\u0442\u0435\u043d\u0442\u0438\u0444\u0438\u043a\u0430\u0446\u0438\u044e \u0438 \u0437\u0430\u043b\u0438\u0432\u043a\u0443 \u043e\u0431\u0440\u0430\u0437\u0430:<\/p>\n<pre><code>docker login registry.example.com docker build -t registry.example.com\/test\/test-1 . docker push registry.example.com\/test\/test-1<\/code><\/pre>\n<p>\u0418\u0441\u0442\u043e\u0447\u043d\u0438\u043a\u0438:<\/p>\n<p><a href=\"https:\/\/medium.com\/@s.petrushin\/%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-gitlab-container-registry-c9ae3fb8a35\">https:\/\/medium.com\/@s.petrushin\/%D0%BD%D0%B0%D1%81%D1%82%D1%80%D0%BE%D0%B9%D0%BA%D0%B0-gitlab-container-registry-c9ae3fb8a35<\/a> <\/p>\n<p><a href=\"https:\/\/serveradmin.ru\/gitlab-container-registry-za-nginx-reverse-proxy\/\">https:\/\/serveradmin.ru\/gitlab-container-registry-za-nginx-reverse-proxy\/<\/a> <\/p>\n<blockquote>\n<p><a href=\"https:\/\/t.me\/timewebru\"><strong>\u041d\u043e\u0432\u043e\u0441\u0442\u0438, \u043e\u0431\u0437\u043e\u0440\u044b \u043f\u0440\u043e\u0434\u0443\u043a\u0442\u043e\u0432 \u0438 \u043a\u043e\u043d\u043a\u0443\u0440\u0441\u044b \u043e\u0442 \u043a\u043e\u043c\u0430\u043d\u0434\u044b Timeweb.Cloud &#8212; \u0432 \u043d\u0430\u0448\u0435\u043c Telegram-\u043a\u0430\u043d\u0430\u043b\u0435<\/strong><\/a> <strong>\u21a9<\/strong><\/p>\n<\/blockquote>\n<figure class=\"full-width\">\n<div><figcaption><a href=\"https:\/\/timeweb.cloud\/?i=106909\"><em>\u0416\u0430\u043c\u043a\u043d\u0443\u0442\u044c<\/em><\/a><\/figcaption><\/div>\n<\/figure>\n<\/div>\n<\/div>\n<\/div>\n<p><!----><!----><\/div>\n<p><!----><!----><br \/> \u0441\u0441\u044b\u043b\u043a\u0430 \u043d\u0430 \u043e\u0440\u0438\u0433\u0438\u043d\u0430\u043b \u0441\u0442\u0430\u0442\u044c\u0438 <a href=\"https:\/\/habr.com\/ru\/articles\/589675\/\"> https:\/\/habr.com\/ru\/articles\/589675\/<\/a><br \/><\/br><\/br><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[],"tags":[],"class_list":["post-396503","post","type-post","status-publish","format-standard","hentry"],"_links":{"self":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/396503","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=396503"}],"version-history":[{"count":0,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=\/wp\/v2\/posts\/396503\/revisions"}],"wp:attachment":[{"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=396503"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=396503"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/savepearlharbor.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=396503"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}