-
Notifications
You must be signed in to change notification settings - Fork 0
/
dev.Dockerfile
36 lines (27 loc) · 1.13 KB
/
dev.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
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.11.01
LABEL org.opencontainers.image.description="Local development image the Bento aggregation service."
LABEL devcontainer.metadata='[{ \
"remoteUser": "bento_user", \
"customizations": { \
"vscode": { \
"extensions": ["ms-python.python", "eamodio.gitlens"], \
"settings": {"workspaceFolder": "/aggregation"} \
} \
} \
}]'
# Run as root in the Dockerfile until we drop down to the service user in the entrypoint
USER root
WORKDIR /aggregation
COPY pyproject.toml .
COPY poetry.lock .
# Install production + development dependencies
# Without --no-root, we get errors related to the code not being copied in yet.
# But we don't want the code here, otherwise Docker cache doesn't work well.
RUN poetry config virtualenvs.create false && \
poetry install --no-root
# Don't copy code in, since it gets mounted in with development mode.
# Copy in an entrypoint + runner script so we have somewhere to start.
COPY run.dev.bash .
ENV BENTO_DEBUG=True
# Use base image entrypoint for dropping down into bento_user & running this CMD
CMD ["bash", "./run.dev.bash"]