some help would be appreciated.
I run a server and am running a docker-registry that I'm trying to push/pull to from my local device. My local device is configured as per:
sudo vim /etc/hostsof your local device and add a new entry:# Manually added for server Docker registry <server_ip> nucping nucto ensure connection.sudo vim /etc/docker/daemon.json{ "insecure-registries": ["nuc:5000"] }Edit
sudo vim /etc/default/docker{ # Use DOCKER_OPTS to modify the daemon startup options. DOCKER_OPTS="--insecure-registry=nuc:5000" }
The issue I get is that when running docker info the specified insecure-registry isn't listed, however, when I run sudo docker info it is listed. Please note that my current $USER is part of the docker group and I can run docker commands without needing to use sudo (the following was followed: Docker post-install steps).
Note I got inspiration from StackOverflow at:
- Add Insecure Registry to Docker
- Add Insecure Registry to Docker in ubuntu [closed]
- Insecure Docker registry and self-signed certificates
- docker --insecure-registry flag not working as expected
Any help and guidance would be greatly appreciated.
EDIT: Additional info
docker context lsNAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR default moby Current DOCKER_HOST based configuration unix:///var/run/docker.sock desktop-linux * moby Docker Desktop unix:///home/ben/.docker/desktop/docker.socksudo docker context lsNAME TYPE DESCRIPTION DOCKER ENDPOINT KUBERNETES ENDPOINT ORCHESTRATOR default * moby Current DOCKER_HOST based configuration unix:///var/run/docker.sockprintenv DOCKER_HOSTandecho $DOCKER_HOSTreturned with nothingsudo printenv DOCKER_HOSTandsudo echo $DOCKER_HOSTreturned with nothing
From the
docker contextoutput, it appears that you have two separate docker engines. One is installed directly on the host, running as root, and listening on/var/run/docker.sock. The other engine is running inside of a VM with Docker Desktop.The documentation for Desktop on Linux specifies their own config file location at
~/.docker/desktop/settings.json, and there should also be a UI for updating its insecure-registries setting.