-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
executable file
·37 lines (22 loc) · 817 Bytes
/
Dockerfile
File metadata and controls
executable file
·37 lines (22 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# syntax=docker/dockerfile:1
# Comments are provided throughout this file to help you get started.
# If you need more help, visit the Dockerfile reference guide at
# https://docs.docker.com/engine/reference/builder/
ARG PYTHON_VERSION=3.12.0
FROM python:${PYTHON_VERSION}-slim-bullseye as base
WORKDIR /code
# Prevents Python from writing pyc files.
ENV PYTHONDONTWRITEBYTECODE=1
# Keeps Python from buffering stdout and stderr to avoid situations where
# the application crashes without emitting any logs due to buffering.
ENV PYTHONUNBUFFERED=1 \
PORT=8000
# Poetry
# Copy poetry.lock and pyproject.toml
COPY poetry.lock pyproject.toml ./
# Install Poetry
RUN pip install --upgrade pip \
&& pip install poetry \
&& poetry config virtualenvs.create false --local \
&& poetry install
WORKDIR app