Skip to content

Commit

Permalink
add user before move
Browse files Browse the repository at this point in the history
  • Loading branch information
oeway committed Aug 20, 2024
1 parent 4bf3e94 commit 0b18357
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,13 @@ RUN pip install .[server-apps] --no-cache-dir && \
pip install playwright --no-cache-dir && \
playwright install

# Move Playwright .cache folder to the hypha user's home directory
RUN mkdir -p /home/hypha/.cache && \
# Add user and set permissions before moving .cache folder
RUN useradd -u 8877 hypha && \
mkdir -p /home/hypha/.cache && \
mv /root/.cache/ms-playwright /home/hypha/.cache/ && \
chown -R hypha:hypha /home/hypha/.cache

# Add user and switch to non-root user
RUN useradd -u 8877 hypha
# Switch to non-root user
USER hypha

# Expose port
Expand Down

0 comments on commit 0b18357

Please sign in to comment.