Hello there,
in order to build in an environment, which requires a HTTP proxy (i.e. our corporate environment) to download remote resources
ENV http_proxy=<ProxyURI(+credentials)>ENV https_proxy=<ProxyURI(+credentials)>
has to be set at the beginning of web/Dockerfile (or provided as build args).
Two lines cause problems, if this approach is used:
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
This line doesn't seem to respect the environment variables mentioned above and fails to download throwing a warning. The build process fails 2 lines later, when the file is supposed to be executed (not at the download itself, as it seems to still return 0 as exit code. I suggest using curl instead, as there is no apparent reason to invoke PHP for this task (and using curl fixes the problem).
RUN curl --fail --location -o composer-setup.php https://getcomposer.org/installer
RUN sudo -E apt-get -y install libpoppler58 libpoppler-dev libpoppler-cpp-dev
When using http_proxy environment variables, using sudo without -E causes them to be unavailable in the following command, which results in apt-get failing.
I suggest using either the -E option or switching to root for this invocation of apt-get install.
Hello there, in order to build in an environment, which requires a HTTP proxy (i.e. our corporate environment) to download remote resources
ENV http_proxy=<ProxyURI(+credentials)>
ENV https_proxy=<ProxyURI(+credentials)>
has to be set at the beginning ofweb/Dockerfile
(or provided as build args).Two lines cause problems, if this approach is used:
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
This line doesn't seem to respect the environment variables mentioned above and fails to download throwing a warning. The build process fails 2 lines later, when the file is supposed to be executed (not at the download itself, as it seems to still return 0 as exit code. I suggest using curl instead, as there is no apparent reason to invoke PHP for this task (and using curl fixes the problem).RUN curl --fail --location -o composer-setup.php https://getcomposer.org/installer
RUN sudo -E apt-get -y install libpoppler58 libpoppler-dev libpoppler-cpp-dev
When usinghttp_proxy
environment variables, usingsudo
without-E
causes them to be unavailable in the following command, which results inapt-get
failing. I suggest using either the-E
option or switching to root for this invocation ofapt-get install
.