Skip to content

Commit

Permalink
Expand docker.config section
Browse files Browse the repository at this point in the history
Highlight the benefit of doing this if using 2FA on Docker Hub
  • Loading branch information
EDIflyer authored Jul 12, 2022
1 parent 30f36b3 commit 9269c45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/usage-overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ docker run -d \

Also check out [this Stack Overflow answer](https://stackoverflow.com/a/30494145/7872793) for more options on how to pass environment variables.

Mounting the host's docker config file:
Alternatively if you 2FA authentication setup on Docker Hub then passing username and password will be insufficient. Instead you can run `docker login` to store your credentials in `$HOME/.docker/config.json` and then mount this config file to make it available to the Watchtower container:

```bash
docker run -d \
--name watchtower \
-v /home/<user>/.docker/config.json:/config.json \
-v $HOME/.docker/config.json:/config.json \
-v /var/run/docker.sock:/var/run/docker.sock \
containrrr/watchtower container_to_watch --debug
```
Expand Down

0 comments on commit 9269c45

Please sign in to comment.