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

docs: add note about docker hub private images #1132

Merged
merged 1 commit into from
Dec 27, 2021
Merged

Conversation

piksel
Copy link
Member

@piksel piksel commented Nov 12, 2021

Add findings in #796 (comment) to docs.

@codecov
Copy link

codecov bot commented Nov 12, 2021

Codecov Report

Merging #1132 (f81d0b1) into main (d9d6f79) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1132   +/-   ##
=======================================
  Coverage   61.49%   61.49%           
=======================================
  Files          23       23           
  Lines        1470     1470           
=======================================
  Hits          904      904           
  Misses        482      482           
  Partials       84       84           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update d9d6f79...f81d0b1. Read the comment docs.

@dschmidt
Copy link

I can not confirm this. For me only docker.io in image name and config.json worked. This did not.

@piksel
Copy link
Member Author

piksel commented Nov 16, 2021

@dschmidt Could you post the --debug lines corresponding these:

DEBU[0004] Trying to load authentication credentials.    container=/wt-test2 image="index.docker.io/piksel/wt-test:latest"
DEBU[0004] Loaded auth credentials for user piksel, on registry index.docker.io/piksel/wt-test:latest, from file /config.json

?

And the contents of your config.json (with the actual credentials removed of course).

@dschmidt
Copy link

Of course, happy to :)

This works:

watchtower_1         | time="2021-11-16T20:05:48Z" level=debug msg="Trying to load authentication credentials." container=/examples_projectxyz_1 image="docker.io/userxyz/projectxyz:tagxyz"
watchtower_1         | time="2021-11-16T20:05:48Z" level=debug msg="Loaded auth credentials for user userxyz, on registry docker.io/userxyz/projectxyz:tagxyz, from file /config/config.json"

with

{
        "auths": {
                "https://docker.io": {
                        "auth": "...."
                }
        }
}

and

  projectxyz:
    image: docker.io/userxyz/projectxyz:tagxyz

Actually this seems to work as well, although I was pretty sure I had tested it and it didn't work ... anyhow this seems to work actually:

watchtower_1         | time="2021-11-16T20:14:27Z" level=debug msg="Trying to load authentication credentials." container=/examples_nodered_1 image="index.docker.io/userxyz/projectxyz:tagxyz"
watchtower_1         | time="2021-11-16T20:14:27Z" level=debug msg="Loaded auth credentials for user userxyz, on registry index.docker.io/userxyz/projectxyz:tagxyz, from file /config/config.json"

with

  projectxyz:
    image: index.docker.io/userxyz/projectxyz:tagxyz
{
        "auths": {
                "https://index.docker.io/v1/": {
                        "auth": "..."
                }
        }
}

which is what I get when simply logging in with docker login.

So false alarm, I think you are right. I'm just not sure this documentation actually helps, as this information is basically already available from https://github.com/containrrr/watchtower/blob/f81d0b17c19e6b885884ce2f94a3aab76e258e88/docs/private-registries.md#share-the-docker-configuration-file.
I for some reason just failed to apply it correctly, maybe because I somehow messed up reloading after making changes...

@piksel
Copy link
Member Author

piksel commented Nov 17, 2021

Do you mean the prefix in the docker compose for watchtower? I don't see anything that expressively tells you to add it to your other containers... right?

@simskij simskij merged commit 93ccce8 into main Dec 27, 2021
@simskij simskij deleted the docs/private-registries branch December 27, 2021 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants