forked from sihrc/cookiecutter-poetry-py3-10
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
32 lines (19 loc) · 793 Bytes
/
Dockerfile
File metadata and controls
32 lines (19 loc) · 793 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
FROM python:3.13.3 as builder
ENV PATH="/root/.local/bin:${PATH}"
RUN curl -sSL https://install.python-poetry.org | python3 - && \
poetry self update --preview && \
poetry config virtualenvs.in-project true
COPY pyproject.toml poetry.lock /venv/
WORKDIR /venv/
RUN poetry install
FROM python:3.13.3
LABEL version="{{cookiecutter.version}}"
LABEL author="{{cookiecutter.author}}"
LABEL email="{{cookiecutter.email}}"
LABEL description="{{cookiecutter.project_description}}"
ENV PYTHONPATH=/{{cookiecutter.project_slug}} PATH=/venv/.venv/bin:/{{cookiecutter.project_slug}}/bin:/{{cookiecutter.project_slug}}/scripts:${PATH}
COPY --from=builder /venv /venv
RUN apt update
WORKDIR /{{ cookiecutter.project_slug }}
COPY . /{{ cookiecutter.project_slug }}
ENTRYPOINT [ "bash" ]