Docker image DNS issues

  composer-php, docker, docker-compose, github-api, php

I am trying to build a Docker container for my new project and seem to be getting odd GitHub DNS resolution issues while attempting to run the docker build command.

I can’t run the composer install command on my local machine because I have an outdated version of PHP which is why I am attempting to use a container.

Multiple other project on my personal machine don’t have an issue installing composer dependences, but when I try and build the Docker Image I get several (but not all) errors for packages that are as follows

  - Syncing phar-io/version (3.1.0) into cache
Failed to download slim/psr7 from dist: curl error 6 while downloading Could not resolve host:
Now trying to download from source
  - Syncing slim/psr7 (1.4) into cache

 120/120 [============================] 100%The following exception probably indicates you have misconfigured DNS resolver(s)

  curl error 6 while downloading Could not resolve host:  

Is this something I have misconfigured in Docker, the DockerFile, or my Composer JSON?

Source: Docker Questions