Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
bralbral committed Jun 16, 2024
1 parent 5d900aa commit da64e36
Showing 1 changed file with 10 additions and 15 deletions.
25 changes: 10 additions & 15 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,22 +1,17 @@
FROM python:3.11-slim-bullseye
FROM python:3.11-alpine

# Update the package list and install required packages
RUN apt-get update && \
apt-get install -y git && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
WORKDIR /app

# Copy the application source code to the container and set the working directory
# Copy the application source code to the container
COPY ./requirements.txt /app/requirements.txt

# copy src
COPY ./src /app/src

WORKDIR /app

# Install Python dependencies
RUN pip3 install --no-cache-dir --upgrade pip && \
pip3 install --no-cache-dir -r requirements.txt
# Update the package list, install required packages, and install Python dependencies
RUN apk update && \
apk add --no-cache git && \
pip install --no-cache-dir --upgrade pip && \
pip install --no-cache-dir -r requirements.txt && \
rm -rf /var/cache/apk/*

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

0 comments on commit da64e36

Please sign in to comment.