-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (23 loc) · 839 Bytes
/
Dockerfile
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
33
34
ARG build_for=linux/amd64
FROM --platform=$build_for python:3.10-slim-bullseye AS python_node
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONBUFFERED 1
ENV PIP_NO_CACHE_DIR 1
WORKDIR /usr/app
ENV PATH="/opt/node-v12.22.12-linux-x64/bin:${PATH}"
RUN apt-get update && apt-get install -y curl unzip
RUN curl https://nodejs.org/dist/v12.22.12/node-v12.22.12-linux-x64.tar.gz |tar xzf - -C /opt/
FROM python_node as poetry
ENV POETRY_VERSION 1.3.1
ENV POETRY_HOME=/opt/poetry
ENV POETRY_VIRTUALENVS_IN_PROJECT=true
ENV PATH="$POETRY_HOME/bin:$PATH"
RUN pip install "poetry==${POETRY_VERSION}"
COPY . ./
RUN poetry install --no-interaction --no-ansi --no-root -vvv
FROM python_node as runtime
ENV PATH="/usr/app/.venv/bin:$PATH"
ENV HOME="/usr/app"
COPY --from=poetry /usr/app /usr/app
RUN pc init
ENTRYPOINT ["pc", "run", "--env", "prod"]