-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from erikperkins/smaller-image
Smaller image
- Loading branch information
Showing
1 changed file
with
10 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,15 @@ | ||
FROM python:3.9-slim-bullseye | ||
FROM python:3.9-slim-bullseye AS base | ||
FROM base AS builder | ||
|
||
RUN useradd mariotte | ||
RUN mkdir /install | ||
WORKDIR /install | ||
COPY requirements.txt requirements.txt | ||
RUN pip install --prefix=/install -r requirements.txt | ||
|
||
FROM base | ||
COPY --from=builder /install /usr/local | ||
ENV APP=/home/mariotte/app | ||
WORKDIR $APP | ||
COPY requirements.txt requirements.txt | ||
RUN pip3 install -r requirements.txt | ||
COPY . . | ||
CMD ["python3", "main.py"] |