cachethq / Docker

A Dockerized version of Cachet.
https://cachethq.io
BSD 3-Clause "New" or "Revised" License
415 stars 280 forks source link

Build the docker-image beyond a proxy #286

Closed Transrian closed 6 years ago

Transrian commented 6 years ago

I tried to build the image using the docker-compose build beyond a corporate proxy, but it didn't work.

So i set-up the env-environment proxy infos in the Dockerfile

ENV http_proxy xxx.com
ENV https_proxy xxx.com
ENV no_proxy .yyy.com

But those steps were still failling, as php doesn't use the proxy environment variables :

https://github.com/CachetHQ/Docker/blob/373089fb3be114908306092c11580f574abcd4bc/Dockerfile#L68 https://github.com/CachetHQ/Docker/blob/373089fb3be114908306092c11580f574abcd4bc/Dockerfile#L69

By deleting those two lines and putting that just beyond, it seems to solve the problem:

RUN wget https://getcomposer.org/installer -O /tmp/composer-setup.php && \
    wget https://composer.github.io/installer.sig -O /tmp/composer-setup.sig

Perhaps made those modifications, and be able to use external environment variables to build the docker-image (eg. those with the export http_proxy=xxx.com) ?