title: Docker returned a non-zero code: 28 when install composer
body: <p>I use docker-compose to handle my application. But when I build the Dokerfile, it returns a non-zero code (28) as error after 5 minutes, at the  <strong>curl composer</strong> step.
  Our office is connected to the internet via a VPN, and our download speed is limited to 120k  max.</p>
  
  <p><a href="https://i.stack.imgur.com/H04Qu.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/H04Qu.png" alt="Screenshot of the error"></a></p>
  
  <p><strong>Dockerfile:</strong></p>
  
  <pre><code># ubuntu strech
  FROM ubuntu:18.04
  
  # debian no intract
  ENV DEBIAN_FRONTEND noninteractive
  
  RUN sed -i 's/archive.ubuntu.com/ir.archive.ubuntu.com/g' /etc/apt/sources.list
  
  RUN export COMPOSER_CACHE_DIR=/tmp/composer ; \
      export LANG=en_US.utf8 ; \
      export LC_ALL=C.UTF-8 ;
  
  # Update and upgrade
  RUN apt-get update -y \
    &amp;&amp; apt-get -y upgrade &amp;&amp; apt-get install -y --no-install-recommends apt-utils \
    &amp;&amp; apt-get install -y --no-install-recommends \
    curl locales ca-certificates \
    build-essential sudo gnupg \
    &amp;&amp; localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US 
  
  RUN apt-get clean 
  
  RUN apt-get install -y pkg-config apt-transport-https vim htop build-essential bash-completion git \
    locales lsb-release php7.2-cli php7.2-common php7.2-curl php7.2-fpm php7.2-intl php7.2-soap php7.2-xml php7.2-gd \
    php7.2-readline nginx-light php7.2-mbstring zip unzip nano iputils-ping
  
  # install nodejs
  RUN curl -sL https://deb.nodesource.com/setup_11.x  | bash -
  RUN apt-get install -y nodejs
  
  # composer and php
  RUN curl https://getcomposer.org/composer.phar &gt; /usr/bin/composer &amp;&amp; chmod +x /usr/bin/composer &amp;&amp; composer self-update
  RUN sed -i 's/\/run\/php\/php7.2-fpm.sock/127.0.0.1:9000/g' /etc/php/7.2/fpm/pool.d/www.conf
  
  # append fastcgi_param SCRIPT_FILENAME
  RUN echo 'fastcgi_param  SCRIPT_FILENAME    $document_root/$fastcgi_script_name;' &gt;&gt; /etc/nginx/fastcgi_params
  RUN service nginx restart
  
  RUN apt-get purge -y build-essential dpkg-dev &amp;&amp; apt-get autoremove -y &amp;&amp; apt-get clean
  
  COPY ./portal-entrypoint /usr/bin/portal-entrypoint
  RUN chmod +x /usr/bin/portal-entrypoint
  
  
  # ports
  EXPOSE 80
  
  # commands
  CMD ["/bin/bash", "/usr/bin/portal-entrypoint"]
  </code></pre>