I’m facing a strange problem since a while and I couldn’t find any clue how to fix it.
I’m using Docker Desktop (4.29.0) on Mac OS 14.4.1 with Chip M1 Max.
I’m running and environment with multiple services. One service is Nginx that I want to pull from a private registry.
When pulling the image using docker-compose.yml I can build the image easily since I’ve added the repo to usecure-registeries in docker daemon.json
file
a bit where I define the service in docker-compose.yml
nginx:
image: my-unsecure-registry/nginx:latest
depends_on:
...
here where I define insecure-registries in daemon.json
{
...
"insecure-registries": [
"my-unsecure-registry:443"
]
}
Things become problematic when I want to define the image in Dockerfile
here is how is done in docker-compose.yml
nginx:
build: ../docker-image/nginx
and here how I define it in docker-image/nginx/Dockerfile
FROM my-unsecure-registry/nginx:latest
I get the error that says there is a problem with self signed certificate
=> ERROR [nginx internal] load metadata for my-unsecure-registry/nginx:latest 0.2s
------
> [nginx internal] load metadata for my-unsecure-registry/nginx:latest:
------
failed to solve: my-unsecure-registry/nginx:latest: failed to resolve source metadata for my-unsecure-registry/nginx:latest: failed to do request: Head "https://my-unsecure-registry/v2/nginx/manifests/latest": tls: failed to verify certificate: x509: certificate signed by unknown authority
knowing that the certificate is added to keychain and put as Always trusted.
Has anyone gone through something similar ?
I want to pull a docker image from unsecure private registry and then apply some extra code using Dockerfile