Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
czoido committed Sep 12, 2024
1 parent 2507615 commit c75ad92
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ RUN apt-get -qq update \
make build-essential libssl-dev zlib1g-dev libbz2-dev \
libreadline-dev libsqlite3-dev wget curl llvm libncurses5-dev libncursesw5-dev \
xz-utils tk-dev libffi-dev liblzma-dev git \
passwd # Installs 'adduser' and 'usermod' \
&& rm -rf /var/lib/apt/lists/*

# Set up pyenv environment and install Python version
Expand All @@ -26,20 +25,10 @@ RUN curl -L https://github.com/pyenv/pyenv-installer/raw/master/bin/pyenv-instal
RUN apt-get -qq remove make build-essential gcc \
&& rm -rf /var/lib/apt/lists/*

# Check if the user 'runner' exists, if not, set necessary permissions
RUN if ! id -u runner > /dev/null 2>&1; then \
adduser --disabled-password --gecos "" --uid 1001 runner; \
groupadd docker --gid 123; \
usermod -aG sudo runner; \
usermod -aG docker runner; \
fi \
&& echo "%sudo ALL=(ALL:ALL) NOPASSWD:ALL" > /etc/sudoers \
&& echo "Defaults env_keep += \"DEBIAN_FRONTEND\"" >> /etc/sudoers

# Set up the work directory for the runner user
WORKDIR /home/runner

# Switch to the runner user, assuming it exists or was just created
# Switch to the runner user
USER runner

# Ensure pyenv is available for the runner user
Expand Down

0 comments on commit c75ad92

Please sign in to comment.