From 8e73cd0212ff1803b94e72281ddf1d9c83791540 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20B?= Date: Wed, 23 Jan 2019 11:42:46 +0100 Subject: [PATCH] Update build_enhancements.md with troubleshooting hints Add troubleshooting tips from https://github.com/moby/moby/issues/38303 --- develop/develop-images/build_enhancements.md | 36 ++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/develop/develop-images/build_enhancements.md b/develop/develop-images/build_enhancements.md index ed3f903b53..9e8a60bbd0 100644 --- a/develop/develop-images/build_enhancements.md +++ b/develop/develop-images/build_enhancements.md @@ -189,3 +189,39 @@ Once the `Dockerfile` is created, use the `--ssh` option for connectivity with t ```bash $ docker build --ssh default . ``` + +## Troubleshooting : issues with private registries + +#### x509: certificate signed by unknown authority +If you are fetching images from insecure registry (with self-signed certificates) and/or using such aa registry as a mirror, you are facing a known issue in Docker 18.09 : +``` +[+] Building 0.4s (3/3) FINISHED + => [internal] load build definition from Dockerfile + => => transferring dockerfile: 169B + => [internal] load .dockerignore + => => transferring context: 2B + => ERROR resolve image config for docker.io/docker/dockerfile:experimental +------ + > resolve image config for docker.io/docker/dockerfile:experimental: +------ +failed to do request: Head https://repo.mycompany.com/v2/docker/dockerfile/manifests/experimental: x509: certificate signed by unknown authority +``` +Solution : secure your registry properly. You can get SSL certificates from Let's Encrypt for free. See https://docs.docker.com/registry/deploying/ + + +#### image not found when the private registry is running on Sonatype Nexus version < 3.15 + +If you are running a privatee registry using Sonatype Nexus version < 3.15, and receive an error similar to the following : +``` +------ + > [internal] load metadata for docker.io/library/maven:3.5.3-alpine: +------ +------ + > [1/4] FROM docker.io/library/maven:3.5.3-alpine: +------ +rpc error: code = Unknown desc = docker.io/library/maven:3.5.3-alpine not found +``` +you may be facing the bug below : https://issues.sonatype.org/browse/NEXUS-12684 + +Solution is to upgrade your Nexus to version 3.15 or above. +