Configuring Docker insecure repository ( server gave HTTP response to HTTPS client)

If docker gives the error “server gave HTTP response to HTTPS client” when starting a container, you can fix it by adding the following configuration:

for never Docker releases, create or update the file /etc/docker/daemon.json as:

{ "insecure-registries":["MY_INSECURE_ADDRESS:5000"] }

Replace MY_INSECURE_ADDRESS with your own address.

for older Docker releases, create or update the file  /etc/init.d/docker as:

DOCKER_OPTS=--insecure-registry MY_INSECURE_ADDRESS:5000

Replace MY_INSECURE_ADDRESS with your own address.

Restart the docker service (sudo service docker restart).

Docker container should start now without an error.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s