Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Test: Remove conda group
  • Loading branch information
alexander-smolyakov committed Aug 1, 2023
commit 4401785099e9b026ddc7c509eb0126e9158f1b84
15 changes: 6 additions & 9 deletions src/anaconda/.devcontainer/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@ RUN apt-get update && export DEBIAN_FRONTEND=noninteractive \
&& echo "conda activate base" >> ~/.bashrc \
&& apt-get clean -y && rm -rf /var/lib/apt/lists/* /tmp/library-scripts/add-notice.sh

# We need to execute pip install / conda update commands under
# container user since pip doesn't preserve directory permissions
USER ${USERNAME}

# Temporary: Upgrade python packages due to mentioned CVEs
# They are installed by the base image (continuumio/anaconda3) which does not have the patch.
RUN python3 -m pip install \
Expand Down Expand Up @@ -87,12 +91,5 @@ RUN conda install \
# https://github.com/advisories/GHSA-mrwq-x4v8-fh7p
pygments=2.15.1

# Create conda group, update conda directory permissions,
# add user to conda group
# Note: We need to execute these commands after pip install / conda update
# since pip doesn't preserve directory permissions
RUN groupadd -r conda --gid 900 \
&& chown -R :conda /opt/conda \
&& chmod -R g+w /opt/conda \
&& find /opt -type d | xargs -n 1 chmod g+s \
&& usermod -aG conda ${USERNAME}
# Switch back to the root user for backward compatibility
USER root