<IfModule mod_proxy.c>
SSLProxyEngine on
ProxyRequests Off
ProxyPreserveHost On
<Proxy *>
Require all granted
</Proxy>
Header always set "Docker-Distribution-Api-Version" "registry/2.0"
Header onsuccess set "Docker-Distribution-Api-Version" "registry/2.0"
RequestHeader set X-Forwarded-Proto "https"
ProxyPass /repos http://localhost:8080
ProxyPassReverse /repos http://localhost:8080
ProxyPass /v2 http://localhost:55555/v2
ProxyPassReverse /v2 http://localhost:55555/v2
ProxyPass /v1 http://localhost:55555/v1
ProxyPassReverse /v1 http://localhost:55555/v1
ProxyPass /nexus http://localhost:8081/
ProxyPassReverse /nexus http://localhost:8081/
ProxyPass / http://localhost:8081/
ProxyPassReverse / http://localhost:8081/
Timeout 2400
ProxyTimeout 2400
ProxyBadHeader Ignore
</IfModule>
{
"registry-mirrors": ["https://repository.ourdomain"],
"insecure-registries": ["repository.ourdomain"]
}
$ docker login -u myaccount repository.ourdomain
$ docker search repository.ourdomain/centos
$ docker pull centos:latest
docker tag myimage repository.ourdomain/myimage:mytag
docker push repository.ourdomain/myimage:mytag
docker rmi <myimage ID>
docker pull myimage:mytag
<!DOCTYPE html>
<html>
<head>
<title>404 - Nexus Repository Manager</title>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\"/>
<!--[if lt IE 9]>
<script>(new Image).src=\"https://repository.ourdomain/favicon.ico?3.6.0-02\"</script>
<![endif]-->
<link rel=\"icon\" type=\"image/png\" href=\"https://repository.ourdomain/favicon-32x32.png?3.6.0-02\" sizes=\"32x32\">
<link rel=\"mask-icon\" href=\"https://repository.ourdomain/safari-pinned-tab.svg?3.6.0-02\" color=\"#5bbad5\">
<link rel=\"icon\" type=\"image/png\" href=\"https://repository.ourdomain/favicon-16x16.png?3.6.0-02\" sizes=\"16x16\">
<link rel=\"shortcut icon\" href=\"https://repository.ourdomain/favicon.ico?3.6.0-02\">
<meta name=\"msapplication-TileImage\" content=\"https://repository.ourdomain/mstile-144x144.png?3.6.0-02\">
<meta name=\"msapplication-TileColor\" content=\"#00a300\">
<link rel=\"stylesheet\" type=\"text/css\" href=\"https://repository.ourdomain/static/css/nexus-content.css?3.6.0-02\"/>
</head>
<body>
<div class=\"nexus-header\">
<a href=\"https://repository.ourdomain\">
<div class=\"product-logo\">
<img src=\"https://repository.ourdomain/static/images/nexus.png?3.6.0-02\"/>
</div>
<div class=\"product-id\">
<div class=\"product-id__line-1\">
<span class=\"product-name\">Nexus Repository Manager</span>
</div>
<div class=\"product-id__line-2\">
<span class=\"product-spec\">OSS 3.6.0-02</span>
</div>
</div>
</a>
</div>
<div class=\"nexus-body\">
<div class=\"content-header\">
<img src=\"https://repository.ourdomain/static/rapture/resources/icons/x32/exclamation.png?3.6.0-02\"/>
<span class=\"title\">Error 404</span>
<span class=\"description\">Not Found</span>
</div>
<div class=\"content-body\">
<div class=\"content-section\">
Not Found
</div>
</div>
</div>
</body>
</html>
10.52.94.150 - - [13/Nov/2017:16:18:02 +1100] "POST /v2/myimage/blobs/uploads/ HTTP/1.1" 404 1953
10.52.94.150 - - [13/Nov/2017:16:18:02 +1100] "POST /v2/myimage/blobs/uploads/ HTTP/1.1" 404 1953
[13/Nov/2017:16:18:02 +1100] 10.52.94.150 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "POST /v2/myimage/blobs/uploads/ HTTP/1.1" 1953
[13/Nov/2017:16:18:02 +1100] 10.52.94.150 TLSv1.2 ECDHE-RSA-AES256-GCM-SHA384 "POST /v2/myimage/blobs/uploads/ HTTP/1.1" 1953
10.52.94.150 - - [13/Nov/2017:16:18:02 +1100] "GET /repository/ncdocker/v2/ HTTP/1.1" 401 113 2 "docker/17.09.0-ce go/go1.8.3 git-commit/afdb6d4 kernel/3.10.0-693.2.2.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/17.09.0-ce \(linux\))"
10.52.94.150 - - [13/Nov/2017:16:18:02 +1100] "GET /repository/ncdocker/v2/token?scope=repository%3Amyimage%3Apush%2Cpull&service=https%3A%2F%2Frepository.ourdomain%2Ftoken HTTP/1.1" 200 60 2 "docker/17.09.0-ce go/go1.8.3 git-commit/afdb6d4 kernel/3.10.0-693.2.2.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/17.09.0-ce \(linux\))"
10.52.94.150 - anonymous [13/Nov/2017:16:18:02 +1100] "POST /repository/ncdocker/v2/myimage/blobs/uploads/ HTTP/1.1" 404 1953 3 "docker/17.09.0-ce go/go1.8.3 git-commit/afdb6d4 kernel/3.10.0-693.2.2.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/17.09.0-ce \(linux\))"
10.52.94.150 - anonymous [13/Nov/2017:16:18:02 +1100] "POST /repository/ncdocker/v2/myimage/blobs/uploads/ HTTP/1.1" 404 1953 1 "docker/17.09.0-ce go/go1.8.3 git-commit/afdb6d4 kernel/3.10.0-693.2.2.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/17.09.0-ce \(linux\))"
10.52.94.150 - anonymous [13/Nov/2017:16:18:02 +1100] "HEAD /repository/ncdocker/v2/myimage/blobs/sha256:c65c4cb3c7fa55459f81a0a113d1e2867a10251ca868fc3dc63c0491023317fb HTTP/1.1" 200 0 4 "docker/17.09.0-ce go/go1.8.3 git-commit/afdb6d4 kernel/3.10.0-693.2.2.el7.x86_64 os/linux arch/amd64 UpstreamClient(Docker-Client/17.09.0-ce \(linux\))"
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/4dbcaeed-a555-4665-bbed-f90ca7c81b00%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
RewriteEngine On
RewriteCond REQUEST_METHOD GET
RewriteRule /v(1|2)/(.*) http://localhost:55555/v$1/$2 [PL]
RewriteCond REQUEST_METHOD POST
RewriteRule /v(1|2)/(.*) http://localhost:55556/v$1/$2 [PL]
--
Met vriendelijke groet / Kind regards,
Nikola Milutinović
Java Software Architect
Address: Trifkovićev trg 6, 21000 Novi Sad, Serbia
Tel.: +31 20 6701 947 | +381 21 2155 500
Mobile: +381 64 2202824
Skype: nikola.milutinovic
Internet:www.levi9.com
Chamber of commerce Levi9 Holding: 34221951
Chamber of commerce Levi9 IT Services BV: 34224746
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users+unsubscribe@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/930c4574-b4dd-4215-8c48-f6659b5fc409%40glists.sonatype.com.
RewriteEngine OnRewriteCond REQUEST_METHOD GET
RewriteRule ^/v(1|2)/(.*) http://localhost:55555/v$1/$2 [P,L]RewriteCond REQUEST_METHOD POSTRewriteRule ^/v(1|2)/(.*) http://localhost:55556/v$1/$2 [P,L]
...
http {
...
upstream nexus {
server localhost:8081;
}
upstream registry {
server localhost:55555;
}
upstream privateregistry {
server localhost:55556;
}
server {
listen 80 default_server;
server_name _;
return 301 https://malbec.centaur.id.au$request_uri;
}
map $request_method $registrytouse {
default "privateregistry";
(GET) "registry";
}
server {
...
# disable any limits to avoid HTTP 413 for large file uploads
client_max_body_size 0;
# required to avoid HTTP 411: see Issue #1486 (https://github.com/docker/docker/issues/1486)
chunked_transfer_encoding on;
location / {
if ($http_user_agent ~ docker ) {
proxy_pass http://$registrytouse;
}
proxy_pass http://nexus;
proxy_set_header Host $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-Proto "https";
}
...
}
}
$ docker build -t mytestimage .
$ docker tag mytestimage malbec.centaur.id.au/library/mytestimage:latest
$ docker push malbec.centaur.id.au/library/mytestimage:latest
$ docker pull mytestimage:latest
$ docker pull ubuntu:latest
--
You received this message because you are subscribed to the Google Groups "Nexus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nexus-users...@glists.sonatype.com.
To post to this group, send email to nexus...@glists.sonatype.com.
To view this discussion on the web visit https://groups.google.com/a/glists.sonatype.com/d/msgid/nexus-users/137404b5-c269-4422-bde4-d886b1d8daf5%40glists.sonatype.com.
For more options, visit https://groups.google.com/a/glists.sonatype.com/d/optout.