Docker Community Forums

Share and learn in the Docker community.

Docker-compose blocked by corporate proxy


(Nikki603) #1

Expected behavior

docker-compose up --build will build and run successfully

Actual behavior

proxy error

Information

Docker for Windows version 1.12.1, build 23cf638, experimental

HTTP and HTTPS proxy settings set in Docker for Windows settings -> Proxies and in Dockerfile.

docker build -t myImage . builds successfully.

Output:

λ docker-compose up --build
ERROR: <HTML><HEAD>
<TITLE>Access Denied</TITLE>
</HEAD>
<BODY>
<FONT face="Helvetica">
<big><strong></strong></big><BR>
</FONT>
<blockquote>
<TABLE border=0 cellPadding=1 width="80%">
<TR><TD>
<FONT face="Helvetica">
<big>Access Denied (authentication_failed)</big>
<BR>
<BR>
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
Your credentials could not be authenticated: "Credentials are missing.". You will not be permitted access until your credentials can be verified.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica">
This is typically caused by an incorrect username and/or password, but could also be caused by network problems.
</FONT>
</TD></TR>
<TR><TD>
<FONT face="Helvetica" SIZE=2>
<BR>
For assistance, contact your network support team.
</FONT>
</TD></TR>
</TABLE>
</blockquote>
</FONT>
</BODY></HTML>

Dockerfile:

FROM node

ENV http_proxy http://username:password@myproxy.local:8080
ENV https_proxy http://username:password@myproxy.local:8080

RUN npm install webpack -g

docker-compose.yml

version: '2'
services:
  myImage:
    build: .
    ports:
    - 8080:8080
    volumes:
    - .:/app:rw

Steps to reproduce the behavior

  1. While on a computer connected behind a proxy that requires username and password, using above Dockerfile and docker-compose.yml
docker-compose up --build

(Michael Friis) #2

I think this is a duplicate of Docker Compose Build Does Not Apply Proxy Settings