Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Dockerfile #56

Merged
merged 1 commit into from
Jun 16, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading