title: docker chainlink container not connecting to postgres database
body: <p>I want to run chainlink node on my local ubuntu machine.
  I used the following commands to install postgresql:</p>
  <pre><code>sudo apt install postgresql
  </code></pre>
  <p>adjusting firewall settings:</p>
  <pre><code>sudo ufw allow from any to any port 5432 proto tcp
  </code></pre>
  <p>accessing postgresql.conf file:</p>
  <pre><code>sudo gedit /etc/postgresql/12/main/postgresql.conf
  </code></pre>
  <p>alter file to</p>
  <pre><code>listen_addresses = ‘*’
  
  sudo gedit /etc/postgresql/14/main/pg_hba.conf
  </code></pre>
  <p>alter file to</p>
  <pre><code>host all all 172.17.0.0/16     md5
  </code></pre>
  <p>created user and databases see the image below:
  [![this image shows my databases and users in postgresql][1]][1]</p>
  <p>configuration of my .env file is:</p>
  <pre><code>ROOT=/chainlink
  LOG_LEVEL=debug
  ETH_CHAIN_ID=42
  MIN_OUTGOING_CONFIRMATIONS=2
  LINK_CONTRACT_ADDRESS=0xa36085F69e2889c224210F603D836748e7dC0088
  CHAINLINK_TLS_PORT=0
  SECURE_COOKIES=false
  GAS_UPDATER_ENABLED=true
  ALLOW_ORIGINS=*
  ETH_URL=wss://kovan.infura.io/ws/v3/f0d1d3d2fbb649e29922ec37d4ff0b45
  DATABASE_URL=postgresql://chainlink:password#123@127.0.0.1:5432/chainlink?ssl=disable
  DATABASE_TIMEOUT=0
  </code></pre>
  <p>I run the following command in the terminal with an image version of 0.10.14.</p>
  <pre><code>cd ~/.chainlink-kovan &amp;&amp; docker run -p 6688:6688 --name chainlink-node --add- 
  host=host:127.0.0.1 -v ~/.chainlink-kovan:/chainlink -it --env-file=.env 
  smartcontract/chainlink:0.10.14 local n
  </code></pre>
  <p>it is not connecting to postgresql database. sometime it shows the error that DATABASE_URL line is wrong in .env file.
  current error log is:</p>
  <pre><code>    {&quot;level&quot;:&quot;warn&quot;,&quot;ts&quot;:1634243680.5286717,&quot;caller&quot;:&quot;logger/default.go:134&quot;,&quot;msg&quot;:&quot;GAS_UPDATER_ENABLED has been deprecated, to enable the block history estimator, please use GAS_ESTIMATOR_MODE=BlockHistory instead&quot;}
  2021-10-14T20:34:40Z [INFO]  Starting Chainlink Node 0.10.14 at commit 8160d7726d778b5c425e4b56af30b76cbc6d222d cmd/local_client.go:63  InstanceUUID=c6169db0-8d75-4902-becc-643bb0672861 SHA=8160d7726d778b5c425e4b56af30b76cbc6d222d Version=0.10.14 id=boot 
  2021-10-14T20:34:40Z [ERROR] invalid database url %spostgresql://chainlink:Kashif#143@127.0.0.1:5939/chainlink?ssl=disable config/config.go:372    stacktrace=github.com/smartcontractkit/chainlink/core/store/config.Config.DatabaseURL
      /chainlink/core/store/config/config.go:372
  github.com/smartcontractkit/chainlink/core/cmd.ChainlinkAppFactory.NewApplication
      /chainlink/core/cmd/client.go:86
  github.com/smartcontractkit/chainlink/core/cmd.(*Client).RunNode
      /chainlink/core/cmd/local_client.go:76
  github.com/urfave/cli.HandleAction
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:524
  github.com/urfave/cli.Command.Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173
  github.com/urfave/cli.(*App).RunAsSubcommand
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:405
  github.com/urfave/cli.Command.startApp
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:372
  github.com/urfave/cli.Command.Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:102
  github.com/urfave/cli.(*App).Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277
  main.Run
      /chainlink/core/main.go:20
  main.main
      /chainlink/core/main.go:14
  runtime.main
      /usr/local/go/src/runtime/proc.go:225 
  2021-10-14T20:34:40Z [ERROR] invalid database url %spostgresql://chainlink:Kashif#143@127.0.0.1:5939/chainlink?ssl=disable config/config.go:372    stacktrace=github.com/smartcontractkit/chainlink/core/store/config.Config.DatabaseURL
      /chainlink/core/store/config/config.go:372
  github.com/smartcontractkit/chainlink/core/store.initializeORM
      /chainlink/core/store/store.go:167
  github.com/smartcontractkit/chainlink/core/store.newStore
      /chainlink/core/store/store.go:69
  github.com/smartcontractkit/chainlink/core/store.NewStore
      /chainlink/core/store/store.go:47
  github.com/smartcontractkit/chainlink/core/services/chainlink.NewApplication
      /chainlink/core/services/chainlink/application.go:152
  github.com/smartcontractkit/chainlink/core/cmd.ChainlinkAppFactory.NewApplication
      /chainlink/core/cmd/client.go:87
  github.com/smartcontractkit/chainlink/core/cmd.(*Client).RunNode
      /chainlink/core/cmd/local_client.go:76
  github.com/urfave/cli.HandleAction
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:524
  github.com/urfave/cli.Command.Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173
  github.com/urfave/cli.(*App).RunAsSubcommand
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:405
  github.com/urfave/cli.Command.startApp
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:372
  github.com/urfave/cli.Command.Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:102
  github.com/urfave/cli.(*App).Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277
  main.Run
      /chainlink/core/main.go:20
  main.main
      /chainlink/core/main.go:14
  runtime.main
      /usr/local/go/src/runtime/proc.go:225 
  2021-10-14T20:34:40Z [ERROR] failed to initialize database, got error failed to connect to `host=/tmp user=root database=`: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory) orm/orm.go:87           stacktrace=github.com/smartcontractkit/chainlink/core/store/orm.NewORM
      /chainlink/core/store/orm/orm.go:87
  github.com/smartcontractkit/chainlink/core/store.initializeORM
      /chainlink/core/store/store.go:168
  github.com/smartcontractkit/chainlink/core/store.newStore
      /chainlink/core/store/store.go:69
  github.com/smartcontractkit/chainlink/core/store.NewStore
      /chainlink/core/store/store.go:47
  github.com/smartcontractkit/chainlink/core/services/chainlink.NewApplication
      /chainlink/core/services/chainlink/application.go:152
  github.com/smartcontractkit/chainlink/core/cmd.ChainlinkAppFactory.NewApplication
      /chainlink/core/cmd/client.go:87
  github.com/smartcontractkit/chainlink/core/cmd.(*Client).RunNode
      /chainlink/core/cmd/local_client.go:76
  github.com/urfave/cli.HandleAction
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:524
  github.com/urfave/cli.Command.Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:173
  github.com/urfave/cli.(*App).RunAsSubcommand
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:405
  github.com/urfave/cli.Command.startApp
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:372
  github.com/urfave/cli.Command.Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/command.go:102
  github.com/urfave/cli.(*App).Run
      /go/pkg/mod/github.com/urfave/cli@v1.22.5/app.go:277
  main.Run
      /chainlink/core/main.go:20
  main.main
      /chainlink/core/main.go:14
  runtime.main
      /usr/local/go/src/runtime/proc.go:225 
  creating application: failed to initialize ORM: initializeORM#NewORM: unable to init DB: unable to open ?application_name=Chainlink+0.10.14+%7C+ORM+%7C+c6169db0-8d75-4902-becc-643bb0672861 for gorm DB conn &amp;{0 0xc000b46108 0 {0 0} [] map[] 0 0 0xc00045a5a0 false map[] map[] 0 0 0 0 &lt;nil&gt; 0 0 0 0 0x5970a0}: failed to connect to `host=/tmp user=root database=`: dial error (dial unix /tmp/.s.PGSQL.5432: connect: no such file or directory)
  </code></pre>
  <p>For two days I have been stuck in this problem and not able to make any progress. <strong>Thank you for your time and effor in anticipation.</strong> don't report this question I have tried all other possible ways watched and read all the help availabe online.
  [1]: <a href="https://i.stack.imgur.com/rrT8u.png" rel="nofollow noreferrer">https://i.stack.imgur.com/rrT8u.png</a></p>