Is there a way to build a docker image from a Dockerfile that uses a base image from a local, insecure registry hosted in Gitlab. For example, if my Dockerfile were:
FROM insecure.registry.local:/mygroup/myproject/image:latest
When I run docker build .
I get the following error:
failed to solve with frontend dockerfile.v0: failed to create LLB definition:.... http: server gave HTTP response to HTTPS client
When I've been interacting with our registry and received similar types http/https errors, I would alter the docker daemon configuration file to include:
...
"insecure-registries" : ["insecure.registry.local"]
...
and everything would work when executing a particular docker command that would trigger it. I'm able to run docker login insecure.registry.local
successfully. Is there a way either in the Dockerfile itself, through the docker build
command or other alternative to have it pull the image successfully in the FROM
statement from an insecure registry?