- deployed a local docker registry container to a docker-machine VM
- cannot push to local docker registry
- get an error including a message similar to, "http: server gave HTTP response to HTTPS client"
- in order to push to this local registry you need to make some modifications to your docker VM
- open
c:\users\<user-name>\.docker\machine\machines\default\config.json
or ~/.docker/machine/machines/default/config.json
in an editor
- find the
InsecureRegistry
property and append "localhost:5000"
to it
- go to your docker terminal
docker-machine provision default
- once complete, run
docker info
- you should see your modification to the insecure registries (e.g. in the truncated output below)
ID: OIKM:PIVF:VPVC:OUV6:SREK:FS4W:6OF4:M2YY:DG2R:NINO:QE2D:U6EQ
Docker Root Dir: /mnt/sda1/var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 16
Goroutines: 25
System Time: 2017-08-04T14:50:05.335227242Z
EventsListeners: 0
Registry: https://index.docker.io/v1/
Labels:
provider=virtualbox
Experimental: false
Insecure Registries:
localhost:5000
127.0.0.0/8
Live Restore Enabled: false
Thank you. Fixed by adding just
docker-machine-ip:5000
in Docker > Preferences... > Insecure registries