docker
This commit is contained in:
1 parent
db6918fa6c
commit
43966f91f4
6 files changed
+164
-18
No files matched your search
@@ -0,0 +1,20 @@
|
||||
FROM python:3.9-slim as compiler
|
||||
ENV PYTHONUNBUFFERED 1
|
||||
|
||||
WORKDIR /app/
|
||||
|
||||
RUN python -m venv /opt/venv
|
||||
# Enable venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
|
||||
COPY ./requirements.txt /app/requirements.txt
|
||||
RUN pip install -Ur requirements.txt
|
||||
|
||||
FROM python:3.9-slim as runner
|
||||
WORKDIR /app/
|
||||
COPY --from=compiler /opt/venv /opt/venv
|
||||
|
||||
# Enable venv
|
||||
ENV PATH="/opt/venv/bin:$PATH"
|
||||
COPY . /app/
|
||||
CMD ["python", "main.py", ]
|
||||
Reference in new issue
Block a user