Skip to content

Commit

Permalink
Fix docbot Dockerfile (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
wwwillchen authored Aug 26, 2024
1 parent f2c65f3 commit 0cbdcdb
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions ai/docbot/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,19 @@ ENV LC_ALL en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8

# Create and activate virtual environment
RUN python -m venv /opt/venv
ENV PATH="/opt/venv/bin:$PATH"

# Install dependencies
COPY requirements.txt .
RUN pip install -r requirements.txt

# Create non-root user
RUN groupadd -g 900 mesop && useradd -u 900 -s /bin/bash -g mesop mesop
# Create non-root user and give write access to /opt/venv
RUN groupadd -g 900 mesop && \
useradd -u 900 -s /bin/bash -g mesop mesop && \
chown -R mesop:mesop /opt/venv && chmod -R 777 /opt/venv

USER mesop

# Add app code here
Expand Down

0 comments on commit 0cbdcdb

Please sign in to comment.