Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bralbral authored Jun 16, 2024
1 parent 2215566 commit 5e7abed
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,28 +29,29 @@ FROM python:3.11-alpine
ENV PYTHONDONTWRITEBYTECODE=1 \
PYTHONUNBUFFERED=1

WORKDIR /app
# Copy the application source code to the container
COPY ./requirements.txt /app/requirements.txt
COPY ./src /app/src
COPY alembic.ini alembic-upgrade.bash /app/

WORKDIR /app

# Install system dependencies, Python dependencies, and clean up
RUN apk update && \
apk add --no-cache \
git \
ffmpeg \
sqlite \
musl-dev \
apk add --no-cache --virtual .build-deps \
gcc \
musl-dev \
libffi-dev \
openssl-dev \
&& \
pip install --no-cache-dir --upgrade pip && \
&& apk add --no-cache \
git \
ffmpeg \
sqlite \
&& pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
apk del .build-deps && \
rm -rf ~/.cache/pip && \
rm -rf /var/cache/apk/*

# Set the user to non-root
USER 1000
USER 1000

0 comments on commit 5e7abed

Please sign in to comment.