Skip to content

Commit

Permalink
Fix user ids and remove ubuntu user
Browse files Browse the repository at this point in the history
  • Loading branch information
sambles committed Oct 25, 2024
1 parent 961869a commit 4e0f5fd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion Dockerfile.api_server
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ RUN apt-get update \
&& apt-get install -y --no-install-recommends sudo python3 python3-pkg-resources curl libmariadbclient-dev-compat \
&& rm -rf /var/lib/apt/lists/

RUN useradd --home /home/server --shell /bin/bash server
ARG USER_ID=1000
RUN userdel -r ubuntu
RUN useradd -u ${USER_ID} --home /home/server --shell /bin/bash server

COPY --chown=server:server --from=build-packages /root/.local /home/server/.local
RUN mkdir -p /var/log/oasis /shared-fs && chmod 777 -R /var/log/oasis

Expand Down
4 changes: 3 additions & 1 deletion Dockerfile.model_worker
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ RUN apt-get update \
&& rm -rf /var/lib/apt/lists/*

# Copy built python packages
RUN useradd --home /home/worker --shell /bin/bash worker
ARG USER_ID=1000
RUN userdel -r ubuntu
RUN useradd -u ${USER_ID} --home /home/worker --shell /bin/bash worker
COPY --chown=worker:worker --from=build-packages /root/.local /home/worker/.local

# Copy in worker files
Expand Down

0 comments on commit 4e0f5fd

Please sign in to comment.