Firstly, set the proxies in Preference Panel.
Secondly, you need to add proxy info to your Dockerfile.txt like this,
bash-3.2$ cat Dockerfile
# Use an official Python runtime as a parent image
# Set the working directory to /app
# Copy the current directory contents into the container at /app
ADD . /app
# Install any needed packages specified in requirements.txt
RUN pip install -r requirements.txt –proxy http://www-xxxxx.com:80 –trusted-host pypi.python.org
# Make port 80 available to the world outside this container
# Define environment variable
ENV NAME World
# Run app.py when the container launches
CMD [“python”, “app.py”]
Thirdly, if you are going to run docker-machine command to create VM. You will have to set below so it can download related stuff.