Skip to content

Using watchtower with private registries and config.json from docker secret. #1686

Answered by piksel
rafalkk asked this question in Q&A
Discussion options

You must be logged in to vote

change the name of secret to be config.json
This solution seemed a bit hacky to me 

You could argue that DOCKER_CONFIG should point to the full file path for the config, but this convention was adopted from the docker client which uses the same environment variable in that way. The intention was to make the transition from docker to watchtower as seamless as possible.

and also makes other environment variables unusable.

You are mixing docker compose yaml syntaxes.
You can either use - KEY=VALUE or KEY: VALUE for the environment variables, but you cannot mix them.

So, either:

environment: 
    DOCKER_CONFIG: /run/secrets 
    WATCHTOWER_POLL_INTERVAL: 5

Or

environment: 
    - DOCKER_CO…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@rafalkk
Comment options

Answer selected by rafalkk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants
Converted from issue

This discussion was converted from issue #1685 on June 29, 2023 06:31.