Update Dockerfile

This commit is contained in:
Chuck Lantz
2020-12-17 13:58:39 -08:00
committed by GitHub
parent 0056e688a1
commit 9d3d6348ab

View File

@@ -6,10 +6,11 @@ FROM mcr.microsoft.com/vscode/devcontainers/python:0-${VARIANT}
ENV PIP_TARGET=/usr/local/pip-global ENV PIP_TARGET=/usr/local/pip-global
ENV PYTHONPATH=${PIP_TARGET}:${PYTHONPATH} ENV PYTHONPATH=${PIP_TARGET}:${PYTHONPATH}
ENV PATH=${PIP_TARGET}/bin:${PATH} ENV PATH=${PIP_TARGET}/bin:${PATH}
RUN mkdir -p ${PIP_TARGET} \ RUN if ! cat /etc/group | grep -e "^pip-global:" > /dev/null 2>&1; then groupadd -r pip-global; fi \
&& chown vscode:root ${PIP_TARGET} \ && usermod -a -G pip-global vscode \
&& echo "if [ \"\$(stat -c '%U' ${PIP_TARGET})\" != \"vscode\" ]; then chown -R vscode:root ${PIP_TARGET}; fi" \ && umask 0002 && mkdir -p ${PIP_TARGET} \
| tee -a /root/.bashrc /home/vscode/.bashrc /root/.zshrc >> /home/vscode/.zshrc && chown :pip-global ${PIP_TARGET} \
&& [ -f "/etc/profile.d/00-restore-env.sh" ] && sed -i -e "s/export PATH=/export PATH=\/usr\/local\/pip-global:/" /etc/profile.d/00-restore-env.sh
# [Optional] If your pip requirements rarely change, uncomment this section to add them to the image. # [Optional] If your pip requirements rarely change, uncomment this section to add them to the image.
# COPY requirements.txt /tmp/pip-tmp/ # COPY requirements.txt /tmp/pip-tmp/