-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathDockerfile
48 lines (35 loc) · 1.35 KB
/
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
42
43
44
45
46
47
48
FROM python:3.9-slim AS python_base
LABEL maintainer="Daniel Lehmberg <[email protected]>"
# Set environment variable for datafold's Makefile to *not* create a second layer of
# virtualization with Python/virtualenv
ENV DOCKER_ENVIRONMENT=true
ARG DATAFOLD_ENV_PATH="/home/datafold_env_files"
ARG DATAFOLD_MOUNT_DIR="/home/datafold/"
RUN mkdir "$DATAFOLD_ENV_PATH"
RUN mkdir "${DATAFOLD_MOUNT_DIR}"
WORKDIR "${DATAFOLD_ENV_PATH}"
# install apt dependencies to build the docs first
ADD Makefile ./
RUN apt-get update \
&& apt-get -y --no-install-recommends install git make dialog apt-utils \
&& make install_docdeps \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/* \
# command "latex" is used to build math equations in the documentation (see configuration in "conf.py").
# Point "latex" to execute "pdftex":
&& ln -sf /usr/bin/pdftex /usr/bin/latex
# install datafold dependencies
ADD requirements.txt "${DATAFOLD_ENV_PATH}"
RUN make install_deps \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*;
# install datafold-dev dependencies
ADD requirements-dev.txt "${DATAFOLD_ENV_PATH}"
RUN make install_devdeps \
&& apt-get autoremove -y \
&& apt-get clean -y \
&& rm -rf /var/lib/apt/lists/*;
WORKDIR "${DATAFOLD_MOUNT_DIR}"
ENTRYPOINT [ "/bin/bash" ]