2

I'm working behind a corporate proxy. I'm on Windows 10 machine but I'm also running VMware. Inside VMware I'm running a Fedora 28 image. Because I'm behind a corporate proxy I have to run an NTLM proxy server on Windows 10 so that Fedora can connect to the internet.

I have everything set up and I can access the internet and pull docker images perfectly. I'm following this tutorial here on docker-compose.

This is my directory structure:

docker-compose-tut 
├── commander 
│ └── Dockerfile 
└── docker-compose.yml

Dockerfile

FROM node:latest

ENV http_proxy=http://prx:3128
ENV https_proxy=http://prx:3128
ENV ftp_proxy=http://prx:3128
ENV no_proxy=localhost,127.0.0.1

RUN curl -L https://github.com/joeferner/redis-commander/tarball/v0.4.5  | tar zx
RUN npm install -g redis-commander

ENTRYPOINT ["redis-commander"]

CMD ["--redis-host", "redis"]

EXPOSE 8081

docker-compose.yml

backend:
    image: redis:latest
    restart: always

frontend:
    build: commander
    links:
        - backend:redis
    environment:
        - ENV_VAR1 = some_value
    ports:
        - 8081:8081
    environment:
        - VAR1=value
    restart: always

When I run the command docker-compose up -d I get the following output

[root@localhost docker-compose-tut]$ docker-compose up -d
Building frontend
Step 1/10 : FROM node:latest
 ---> b064644cf368
Step 2/10 : ENV http_proxy http://prx:3128
 ---> Using cache
 ---> f70ae2e24003
Step 3/10 : ENV https_proxy http://prx:3128
 ---> Using cache
 ---> 12a4e65a3874
Step 4/10 : ENV ftp_proxy http://prx:3128
 ---> Using cache
 ---> 77abdce2f8d7
Step 5/10 : ENV no_proxy localhost,127.0.0.1
 ---> Using cache
 ---> 467c4f25e4f7
Step 6/10 : RUN curl -L https://github.com/joeferner/redis-commander/tarball/v0.4.5  | tar zx
 ---> Using cache
 ---> e3f8b2d8ad64
Step 7/10 : RUN npm install -g redis-commander
 ---> Running in 3189b0fa1086
npm WARN deprecated ejs@0.8.8: Critical security bugs fixed in 2.5.5

When I enter the command docker-compose ps this is literally the output

Name   Command   State   Ports
------------------------------

When I enter the command docker-compose --services the output is the following:

backend
frontend

If I open the browser and enter http://localhost:8081 the browser says that it can't establish a connection to http://localhost:8081.

What am I doing wrong?

TheRealRave
  • 333
  • 1
  • 2
  • 19
  • what happens with docker ps -a? – Chris Cousins Aug 21 '18 at 16:41
  • The official redis-commander Dockerfile is much different than yours. Is there a reason you don't want to use it? You can set the ENV in docker-compose without building your own image. – threeve Aug 21 '18 at 17:45
  • It doesn't look like the `docker-compose up` finished building your image. Was that the last line it output? – BMitch Aug 21 '18 at 22:01

0 Answers0