Docker daemon using https on insecure local registry can't push or pull

Running docker Server Version: 17.03.1-ce on Arch linux. Running registy:v2 on localhost:

docker run --name registry -d -p 5000:5000 \
       -e "REGISTRY_STORAGE=s3" \
       -e "REGISTRY_STORAGE_S3_REGION=region"\
       -e "REGISTRY_STORAGE_S3_BUCKET=bucket"\
       -e "REGISTRY_STORAGE_S3_ACCESSKEY=redacted"\
       -e "REGISTRY_STORAGE_S3_SECRETKEY=redacted"\

Set daemon to use localhost:5000 as insecure registry:

Insecure Registries:

but push still fails with:

Attempting next endpoint for push after error: Get https://localhost:5000/v2/: http: server gave HTTP response to HTTPS client

I also get this on amazon-linux ec2.
This works fine on Ubuntu 16.04 with out setting insecure-regsitries.
I have no idea what’s going on.

Can you grab the docker daemon logs?

My guess is that it tried to push with http, and got an error, so it tried https next. The docker daemon log should have that information. If not, then I would recommend putting your daemon into debug mode, then retry, and then grab the logs. Post the logs that appear while you try doing the push.