Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot access to INSECURE registry while adding WITH_INSECURE_REGISTRY to true #127

Open
jjmasdeu opened this issue Mar 6, 2024 · 1 comment

Comments

@jjmasdeu
Copy link

jjmasdeu commented Mar 6, 2024

I have a local registry in my docker swarm declared as localhost where my imgaes resides and it is INSECURE (http)

docker info
  Insecure Registries:
  127.0.0.0/8

my service is being pulled with
image: 127.0.0.1:5000/ecpdocker:latest
my shepherd is configured to use WITH_INSECURE_REGISTRY

  name: shepherd
    image: containrrr/shepherd
    env:
     IGNORELIST_SERVICES: "agile-redis agile-redis-sent stackredis_redis-sentinel stackredis_redis-master stackredis_redis-slave-node1 stackredis_redis-slave-node2"
     ROLLBACK_ON_FAILURE: "true"
     WITH_INSECURE_REGISTRY: "true"

But logs show shephred trying to access the registry using httpS

shepherd.1.y26s2ela9h68@dswc01-master-do    | failed to configure transport: error pinging v2 registry: Get "https://127.0.0.1:5000/v2/": dial tcp 127.0.0.1:5000: connect: connection refused
shepherd.1.y26s2ela9h68@dswc01-master-do    | Wed Mar  6 05:26:51 EST 2024 Error updating service ecpdocker! Image 127.0.0.1:5000/ecpdocker:latest does not exist or it is not available

I also tried using labels WITH_INSECURE_REGISTRY: "label=shepherd.insecure=true" in shephred declaration and adding shepherd.insecure=true at the service label declaration.

How can I configure shephred to use http instead httpS for a local insecure registry?

@martadinata666
Copy link

Personally I had this line to specify my local insecure HTTP registry at /etc/docker/daemon.json

"insecure-registries": ["192.168.0.2:5050"],

I don't know is the 127.0.0.1 also need port define?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants