-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (21 loc) · 952 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
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.11.01
# 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 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 --without dev --no-root
# Manually copy only what's relevant
# (Don't use .dockerignore, which allows us to have development containers too)
COPY bento_aggregation_service bento_aggregation_service
COPY LICENSE .
COPY README.md .
COPY run.bash .
# Install the module itself, locally (similar to `pip install -e .`)
RUN poetry install --without dev
# Use base image entrypoint for dropping down into bento_user & running this CMD
CMD ["bash", "./run.bash"]