| Beide Seiten der vorigen RevisionVorhergehende ÜberarbeitungNächste Überarbeitung | Vorhergehende Überarbeitung |
| container:docker:start [2025/12/22 13:38] – sborne | container:docker:start [2026/01/09 09:11] (aktuell) – sborne |
|---|
| |
| Wichtig ist hier die Aktivierung von "''Proxy Cache''". | Wichtig ist hier die Aktivierung von "''Proxy Cache''". |
| |
| \\ | |
| ===== Nginx von Docker Hub ===== | ===== Nginx von Docker Hub ===== |
| |
| |
| ''~# docker pull nginx:latest '' | ''~# docker pull nginx:latest '' |
| |
| \\ | |
| |
| Aufruf über den Harbor: | Aufruf über den Harbor: |
| <code> | <code> |
| |
| |
| ~# docker | ~# docker |
| : | : |
| latest | latest |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>Error response from daemon: failed to resolve reference "slxharbor.fritz.box/docker-hub-proxy/nginx:latest": failed to do request: Head "https://slxharbor.fr</font> \\ | <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>Error response from daemon: failed to resolve reference "slxharbor.fritz.box/docker-hub-proxy/nginx:latest": failed to do request: Head "https://slxharbor.fr</font> \ |
| itz.box/v2/docker-hub-proxy/nginx/manifests/latest": tls: failed to verify certificate: x509: certificate signed by unknown authority \\ | itz.box/v2/docker-hub-proxy/nginx/manifests/latest": tls: failed to verify certificate: x509: certificate signed by unknown authority \ |
| ~# | ~# |
| |
| |
| </code> | </code> |
| |
| |
| |
| |
| |
| ===== Zertifikatsproblem ===== | ===== Zertifikatsproblem ===== |
| |
| Dem Harbor-Zertifikat wird nicht vertraut, weil es nicht bekannt ist. Das liegt daran, dass es ein selbst erstelltes Zertfikat ist. Damit Docker dem Zertifikat vertraut, muss es in das Verzeichnis "/usr/local/share/ca-certificates/" kopiert und dem Zertifikatsspeicher hinzugefügt werden. | Dem Harbor-Zertifikat wird nicht vertraut, weil es nicht bekannt ist. Das liegt daran, dass es ein selbst erstelltes Zertfikat ist. Damit Docker dem Zertifikat vertraut, muss es in das Verzeichnis "/usr/local/share/ca-certificates/" kopiert und dem Zertifikatsspeicher hinzugefügt werden. |
| |
| \\ | |
| |
| **Schritt 1**: Kopieren der CA: | **Schritt 1**: Kopieren der CA: |
| | <code> |
| | ~# cp -v ca.crt /usr/local/share/ca-certificates/ |
| | 'ca.crt' -> '/usr/local/share/ca-certificates/ca.crt' |
| | ~# |
| |
| <code>~# | |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>cp -v ca.crt /usr/local/share/ca-certificates/</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>'ca.crt' -> '/usr/local/share/ca-certificates/ca.crt'</font> \\ | |
| ~# | |
| </code> | </code> |
| |
| |
| |
| **Schritt 2**: Kopieren des Server-Zertifikates: | **Schritt 2**: Kopieren des Server-Zertifikates: |
| | <code> |
| | ~# cp -v slxharbor.fritz.box.crt /usr/local/share/ca-certificates/ |
| | 'slxharbor.fritz.box.crt' -> '/usr/local/share/ca-certificates/slxharbor.fritz.box.crt' |
| | ~# |
| |
| <code>~# | |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>cp -v slxharbor.fritz.box.crt /usr/local/share/ca-certificates/</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>'slxharbor.fritz.box.crt' -> '/usr/local/share/ca-certificates/slxharbor.fritz.box.crt'</font> \\ | |
| ~# | |
| </code> | </code> |
| |
| |
| |
| **Schritt 3**: Hinzufügen des Zertifikates zum Zertifikatsspeicher: | **Schritt 3**: Hinzufügen des Zertifikates zum Zertifikatsspeicher: |
| | <code> |
| | ~# update-ca-certificates --fresh |
| | Clearing symlinks in /etc/ssl/certs... |
| | done. |
| | Updating certificates in /etc/ssl/certs... |
| | rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL |
| | rehash: warning: skipping duplicate certificate in slxharbor.fritz.box.pem |
| | 151 added, 0 removed; done. |
| | Running hooks in /etc/ca-certificates/update.d... |
| | ~# |
| |
| <code>~# | |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>update-ca-certificates --fresh</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Clearing symlinks in /etc/ssl/certs...</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>done.</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Updating certificates in /etc/ssl/certs...</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>rehash: warning: skipping ca-certificates.crt, it does not contain exactly one certificate or CRL</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>151 added, 0 removed; done.</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Running hooks in /etc/ca-certificates/update.d...</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>done.</font> \\ | |
| ~# | |
| </code> | </code> |
| |
| |
| |
| **Schritt 4**: Docker-Dienst neu starten: | **Schritt 4**: Docker-Dienst neu starten: |
| | <code> |
| | ~# systemctl restart docker |
| | ~# |
| |
| <code>~# | |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>systemctl restart docker</font> | |
| </code> | </code> |
| |
| |
| |
| Erneuter Pull-Versuch: | Erneuter Pull-Versuch: |
| |
| <code>~# | <code> |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>docker pull slxharbor.fritz.box/docker-hub-proxy/nginx:latest</font> | ~# docker pull slxharbor.fritz.box/docker-hub-proxy/nginx:latest |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | Error response from daemon: unknown: failed to resolve reference "slxharbor.fritz.box/docker-hub-proxy/nginx:latest": unexpected status from HEAD request to https://slxharbor.fritz.box/v2/docker-hub-proxy/nginx/manifests/latest: 401 Unauthorized |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Error response from daemon: unknown: failed to resolve reference "slxharbor.fritz.box/docker-hub-proxy/nginx:latest": unexpected status from HEAD request to</font> \\ | |
| https://slxharbor.fritz.box/v2/docker-hub-proxy/nginx/manifests/latest: 401 Unauthorized \\ | |
| ~# | ~# |
| | |
| </code> | </code> |
| |
| | ===== Authorisierung ===== |
| |
| | Damit Daten vom Harbor geholt werden können, muss eine (einmalige) Authorisierung erfolgen: |
| |
| | <code> |
| | ~# docker login slxharbor.fritz.box --username sborne\ |
| | Password: |
| |
| | WARNING! Your credentials are stored unencrypted in '/root/.docker/config.json'.\ |
| | Configure a credential helper to remove this warning. See\ |
| | https://docs.docker.com/go/credential-store/ |
| |
| ===== Authorisierung ===== | Login Succeeded |
| |
| Damit Daten vom Harbor geholt werden können, muss eine (einmalige) Authorisierung erfolgen: | ~# |
| |
| <code>~# | |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>docker login slxharbor.fritz.box --username sborne</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Password:</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>WARNING! Your credentials are stored unencrypted in '/root/.docker/config.json'.</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Configure a credential helper to remove this warning. See</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>https://docs.docker.com/go/credential-store/</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Login Succeeded</font> \\ | |
| \\ | |
| ~# | |
| </code> | </code> |
| |
| | Nächster Pull-Versuch: |
| |
| | <code> |
| | ~# docker pull slxharbor.fritz.box/docker-hub-proxy/nginx:latest\ |
| | latest: Pulling from docker-hub-proxy/nginx\ |
| | 5b5fa0b64d74: Pull complete \ |
| | 1733a4cd5954: Pull complete \ |
| | 5b219a92f92a: Pull complete \ |
| | ee3a09d2248a: Pull complete \ |
| | 7382b41547b8: Pull complete \ |
| | 9ee60c6c0558: Pull complete \ |
| | 114e699da838: Pull complete \ |
| | adeb5aba46ee: Download complete \ |
| | 11488ed04caf: Download complete \ |
| | Digest: sha256:fb01117203ff38c2f9af91db1a7409459182a37c87cced5cb442d1d8fcc66d19\ |
| | Status: Downloaded newer image for slxharbor.fritz.box/docker-hub-proxy/nginx:latest\ |
| | slxharbor.fritz.box/docker-hub-proxy/nginx:latest |
| |
| Nächster Pull-Versuch: | ~# |
| |
| <code>~# | |
| <font inherit/monospace;;inherit;;#000000background-color:#ffffff;>docker pull slxharbor.fritz.box/docker-hub-proxy/nginx:latest</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>latest: Pulling from docker-hub-proxy/nginx</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>5b5fa0b64d74: Pull complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>1733a4cd5954: Pull complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>5b219a92f92a: Pull complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>ee3a09d2248a: Pull complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>7382b41547b8: Pull complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>9ee60c6c0558: Pull complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>114e699da838: Pull complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>adeb5aba46ee: Download complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>11488ed04caf: Download complete</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Digest: sha256:fb01117203ff38c2f9af91db1a7409459182a37c87cced5cb442d1d8fcc66d19</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>Status: Downloaded newer image for slxharbor.fritz.box/docker-hub-proxy/nginx:latest</font> | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;></font> \\ | |
| <font inherit/inherit;;inherit;;#000000background-color:#ffffff;>slxharbor.fritz.box/docker-hub-proxy/nginx:latest</font> \\ | |
| ~# | |
| </code> | </code> |
| |
| |
| |
| Geschafft! | Geschafft! |
| |
| \\ | ===== Kontrolle im Harbor ===== |
| |
| \\ | Das gezogene Nginx ist jetzt auch im Harbor zu sehen: |
| \\ | |
| |
| \\ | {{:container:docker:harbor-projekt-dockerhub-nginx.png?nolink&900x338}} |
| |
| \\ | \\ |
| | <sub>//.Ende des Dokuments// </sub> |
| ''''<sub>//.Ende des Dokuments// </sub> '''' | |
| |
| |