title: config alpine's proxy in dockerfile
body: <p>I use mvn clean package docker:build to invoke dockerfile(docker version 18.03.1-ce ) in machine B:</p>
  
  <pre><code>FROM openjdk:8-jdk-alpine
  RUN  apk update &amp;&amp; apk upgrade &amp;&amp; apk add netcat-openbsd &amp;&amp; apk add curl
  </code></pre>
  
  <p>it turns out:  </p>
  
  <pre><code>Step 2/8 : RUN  apk update &amp;&amp; apk upgrade &amp;&amp; apk add netcat-openbsd &amp;&amp; apk add curl
  
       ---&gt; Running in 89c9b97b9d75
      fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
      fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
      ERROR: http://dl-cdn.alpinelinux.org/alpine/v3.7/main: temporary error (try again later)
      WARNING: Ignoring APKINDEX.70c88391.tar.gz: No such file or directory
  </code></pre>
  
  <p>I figure out it's network problem,machine B access internet by machine A,I have tried add "dns" in /etc/docker/daemon.json, "httpProxy" in ~/.docker/config.json , now I success in running:  </p>
  
  <pre><code>`docker run -it cc2179b8f042`
  apk update
  </code></pre>
  
  <p>but when I come back to use maven invoking dockfile ,it doesn't work. So how can I make dockfile work and tell me any difference between this two case.</p>