How to use http proxy proxy when docker build?

  docker, question

In dockerfile

RUN apt-get update && apt-get install

The time of build is relatively slow. I want to use http proxy during build, and use priority to the proxy in firefox is available, but doc build is not

Google outgithub issueIt is mentioned in the book that docker version 1.10.3, the command tried the following writing method, but none of them worked.

# docker build --build-arg HTTP_PROXY= .
 # docker build --build-arg=[HTTP_PROXY=] .

Each row of RUN runs in a temporary container, and cannot reach the proxy of the host in the container.