forked from chanzuckerberg/miniwdl
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
34 lines (30 loc) · 1.5 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
# builds docker image for running test suite for the contextual miniwdl source tree
# docker build -t miniwdl .
# run the full test suite -- notice configuration needed for it to command the host dockerd
# docker run \
# -v /var/run/docker.sock:/var/run/docker.sock --group-add $(stat -c %g /var/run/docker.sock)
# -v $(pwd):/home/wdler/miniwdl -v /tmp:/tmp \
# --rm -it miniwdl
# or append 'bash' to that to enter interactive shell
# start with ubuntu:20.04 plus some apt packages
FROM ubuntu:20.04 as deps
ENV LC_ALL C.UTF-8
ENV LANG C.UTF-8
RUN apt-get -qq update && DEBIAN_FRONTEND=noninteractive apt-get -qq install -y \
python3-pip python3-setuptools tzdata wget zip git-core default-jre jq shellcheck docker.io
RUN pip3 install -U pip # due to infamous pyca/cryptography#5771
# add and become 'wdler' user -- it's useful to run the test suite as some arbitrary uid, because
# the runner has numerous file permissions-related constraints
RUN useradd -ms /bin/bash -u 1337 wdler
USER wdler
WORKDIR /home/wdler
RUN mkdir miniwdl
# https://github.com/actions/checkout/issues/760
RUN git config --global --add safe.directory /home/wdler/miniwdl
# install pip requirements
COPY requirements.txt requirements.dev.txt /home/wdler/
RUN bash -o pipefail -c "pip3 install --user -r requirements.dev.txt" && rm requirements.*
ENV PYTHONPATH $PYTHONPATH:/home/wdler/.local/lib/python3.6
ENV PATH $PATH:/home/wdler/.local/bin
# expectation -- mount miniwdl source tree at /home/wdler/miniwdl
CMD make -C miniwdl