fmartinou / whats-up-docker

What's up Docker ( aka WUD ) gets you notified when a new version of your Docker Container is available.
https://fmartinou.github.io/whats-up-docker
MIT License
939 stars 29 forks source link

WUD_REGISTRY_HUB_AUTH__FILE not working, WUD_REGISTRY_HUB_AUTH working correctly #343

Closed ChevySSinSD closed 4 months ago

ChevySSinSD commented 5 months ago

I am not able to get WUD_REGISTRY_HUB_AUTHFILE to work properly, however, I am able to get WUD_REGISTRY_HUB_AUTH to work and also have WUD_REGISTRY_GHCR_TOKENFILE working properly in the same setup. Here is the relevant docker-compose.yml (I have verified the "longsecretstringbase64" text is the same in the file as in my docker-compose.yml, so I'm at a loss of what is going on:

volumes:
  - /home/eric/docker/secrets:/secrets:ro            # Directory for secrets
environment:
  - WUD_REGISTRY_GHCR_TOKEN__FILE=/secrets/WUD_REGISTRY_GHCR_TOKEN  #This works
  - WUD_REGISTRY_HUB_AUTH=longsecretstringbase64                    #This also works
  - WUD_REGISTRY_HUB_AUTH__FILE=/secrets/WUD_REGISTRY_HUB_AUTH      #This does not work
fmartinou commented 5 months ago

Hi,

Can you set set the log level to DEBUG and restart the app to see if, by chance, more details are printed?

ChevySSinSD commented 4 months ago

Here's what I get. I tested the contents of my /secrets/WUD_REGISTRY_HUB_AUTH in a Base64 decoder, it is valid Base64 string and it shows my userid as expected in the decoded format.

18:54:12.246 DEBUG whats-up-docker/registry: Error when registering component hub ("auth" must be a valid base64 string)
18:54:12.244  WARN whats-up-docker/registry: Some registries failed to register (Error when registering component hub ("auth" must be a valid base64 string))
    Error: Error when registering component hub ("auth" must be a valid base64 string)
        at async Promise.all (index 1)
        at async registerRegistries (/home/node/app/registry/index.js:149:9)
        at async Object.init (/home/node/app/registry/index.js:258:5)
ChevySSinSD commented 4 months ago

Just FYI, here's the log showing it works when I have this in docker compose instead: - WUD_REGISTRY_HUB_AUTH=longsecretstringbase64 #This also works Log output:

19:12:38.770  INFO whats-up-docker/registry.hub: Register with configuration {"auth":"Y**************************************************************r"}
ChevySSinSD commented 4 months ago

Apologies, I figured it out, nano was putting a new line in my file, I removed it and all is working properly.

https://github.com/authelia/authelia/issues/1956#issuecomment-831698517