diff --git a/Dockerfile b/Dockerfile index 54a08c4d8859..9c00bf8f0494 100644 --- a/Dockerfile +++ b/Dockerfile @@ -56,11 +56,6 @@ RUN apt-get update && \ curl && \ curl https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | bash && \ apt-get --no-install-recommends install -y git-lfs && git lfs install && \ - if [ -z ${socks_proxy} ]; then \ - echo export "GIT_SSH_COMMAND=\"ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30\"" >> ${HOME}/.bashrc; \ - else \ - echo export "GIT_SSH_COMMAND=\"ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o ProxyCommand='nc -X 5 -x ${socks_proxy} %h %p'\"" >> ${HOME}/.bashrc; \ - fi && \ python3 -m pip install --no-cache-dir -U pip==20.0.1 setuptools && \ ln -fs /usr/share/zoneinfo/${TZ} /etc/localtime && \ dpkg-reconfigure -f noninteractive tzdata && \ @@ -73,7 +68,12 @@ RUN apt-get update && \ ENV USER=${USER} ENV HOME /home/${USER} WORKDIR ${HOME} -RUN adduser --shell /bin/bash --disabled-password --gecos "" ${USER} +RUN adduser --shell /bin/bash --disabled-password --gecos "" ${USER} && \ + if [ -z ${socks_proxy} ]; then \ + echo export "GIT_SSH_COMMAND=\"ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30\"" >> ${HOME}/.bashrc; \ + else \ + echo export "GIT_SSH_COMMAND=\"ssh -o StrictHostKeyChecking=no -o ConnectTimeout=30 -o ProxyCommand='nc -X 5 -x ${socks_proxy} %h %p'\"" >> ${HOME}/.bashrc; \ + fi COPY components /tmp/components