Dude, Where's My config.json File?

Hi everyone,

I have a Ubuntu 16.04.7 host machine, running Docker version 20.10.7 and docker-compose version 1.17.1. I’m using docker-compose to spin up a Ubuntu container (Image ID 54c9d81cbb44). The docker-compose file is pretty simple:

version: "3.0"
      container_name: myContainer
      hostname: TestCntr
      image: 54c9d81cbb44
      stdin_open: true
      tty: true
      network_mode: "host"

I’ve determined that I need to configure the container to use my company’s Internet proxy. A previous post in this forum and additional Google searches tell me that to do this, I need to configure my ~/.docker/config.json file. (See here) Seems simple enough.

But the problem is, when I look at my host, I don’t see a ~/.docker/config.json file! When I search for any config.json file, I see this:

root@myHost:~# find / -name config.json

Somehow, I don’t think that’s the file I want.

So… what to make of this? I’ve been reading Docker documentation and Googling for this problem, but the docs I’ve found are a little vague on this point.

So when I spin up a container using docker-compose, should a ~/.docker/config.json file be created by default? Or do I have to manually create one? If I run docker-compose as user “redapples” (not root), I should be looking in /home/redapples/.docker/config.json ? Does the lack of a config.json file indicate a problem?

Any information is appreciated!