0

I have two servers with no internet on them.One of them is my nexus repository with so many docker images on it.As I have no internet on them ,I can't pull any image because of no ssl configured.I get "http: server gave HTTP response to HTTPS client" error.Is there any way to use docker in http and pull images from my repository ? thanks

I tried to add DOCKER_OPTS="--insecure-registery 185.79.96.171:8081" to /etc/defaults/docker but does not change anything.

2
  • How are you running docker? Installed as root on linux from the Docker repos, installed as root on Linux from one of the distributions, Docker Desktop, rootless, in snap, or some other way?
    – BMitch
    Commented Jun 27 at 14:20
  • @Bmitch I have run it using .deb packages from docker downloadpage.I'm using ubuntu 22.04 and as root.
    – mahdi
    Commented Jun 27 at 19:25

1 Answer 1

0

With dockerd running as root on the host, installed from the docker repositories, the easiest method is to configure the file /etc/docker/daemon.json with the insecure-registries field:

{
  "insecure-registries": [ "185.79.96.171:8081" ]
}

This file must be valid JSON, and may already have existing content (in which case you would add another field).

After editing the file, you may be able to apply the changes by reloading the docker engine with:

sudo systemctl reload docker

If reloading doesn't work, then a restart should be tried, which would stop running containers.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.