-
Notifications
You must be signed in to change notification settings - Fork 1
/
dev.Dockerfile
41 lines (32 loc) · 1.27 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
37
38
39
40
41
FROM ghcr.io/bento-platform/bento_base_image:python-debian-2024.11.01
LABEL org.opencontainers.image.description="Local development image for Bento DRS."
LABEL devcontainer.metadata='[{ \
"remoteUser": "bento_user", \
"customizations": { \
"vscode": { \
"extensions": ["ms-python.python", "eamodio.gitlens"], \
"settings": {"workspaceFolder": "/drs"} \
} \
} \
}]'
RUN apt-get update -y && \
apt-get install libffi-dev -y && \
rm -rf /var/lib/apt/lists/*
WORKDIR /drs
RUN mkdir /wes
COPY pyproject.toml pyproject.toml
COPY poetry.lock 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
# Copy entrypoint and runner script in, so we have something to start with - even though it'll get
# overwritten by volume mount.
COPY entrypoint.bash .
COPY run.dev.bash .
# Tell the service that we're running a local development container
ENV BENTO_CONTAINER_LOCAL=true
# Don't copy any code in - the dev compose file will mount the repo
ENTRYPOINT ["/bin/bash", "/drs/entrypoint.bash"]
CMD ["/bin/bash", "/drs/run.dev.bash"]