-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
41 lines (28 loc) · 838 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
35
36
37
38
39
40
41
FROM python:3.11-slim AS base
ENV PYTHONUNBUFFERED=1 \
POETRY_HOME='/home/poetry' \
POETRY_VERSION=1.3.0 \
PATH="/home/poetry/bin:$PATH"
WORKDIR /home/app
# install poetry
RUN apt update -y && \
apt install curl make -y && (curl -sSL https://install.python-poetry.org | python -) && \
poetry config virtualenvs.create false
# Copying configs of a project
COPY pyproject.toml poetry.lock /home/app/
# Installing dependencies
RUN poetry install --no-root --no-dev
FROM base AS test
# Installing dev dependencies
RUN poetry install --no-root
COPY Makefile /home/app/
COPY sentry_proxy /home/app/sentry_proxy
COPY tests /home/app/tests
# Installing app
RUN poetry install
FROM base AS prod
COPY sentry_proxy /home/app/sentry_proxy
# Installing app
RUN poetry install --no-dev
ENTRYPOINT ["proxy"]
EXPOSE 8899