How to build Docker Images with Dockerfile behind HTTP_PROXY by Jenkins?

Note: Docker 1.9 might help solve this:

  • “Issue 14634”: Builder – Build-time argument passing (e.g., HTTP_PROXY)
  • “PR 15182”: Support for passing build-time variables in build context

Usage (proposed):

docker build --build-arg http_proxy=http://my.proxy.url  --build-arg foo=bar <<MARK
FROM busybox
RUN <command that need http_proxy>
ARG --description="foo's description" foo
USER $foo
MARK

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)