-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
37 lines (21 loc) · 766 Bytes
/
Dockerfile
File metadata and controls
37 lines (21 loc) · 766 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
33
34
35
36
37
FROM python:3.12.10-bookworm AS builder
RUN pip install poetry==2.0.1
ENV POETRY_NO_INTERACTION=1 \
POETRY_VIRTUALENVS_IN_PROJECT=1 \
POETRY_VIRTUALENVS_CREATE=1
WORKDIR /app
COPY pyproject.toml poetry.lock ./
# Add dummy README.md and avoid poetry warning
RUN touch README.md
RUN poetry install --no-root --no-cache --without dev
FROM python:3.12.10-slim-bookworm AS runtime
ENV VIRTUAL_ENV=/app/.venv \
PATH="/app/.venv/bin:$PATH"
COPY --from=builder ${VIRTUAL_ENV} ${VIRTUAL_ENV}
COPY edelweiss /opt/dagster/edelweiss
COPY data /opt/dagster/data
WORKDIR /opt/dagster
RUN adduser --disabled-password --gecos "" edelweiss
USER edelweiss
EXPOSE 4000
ENTRYPOINT ["dagster", "api", "grpc", "-h", "0.0.0.0", "-p", "4000", "-m", "edelweiss"]