forked from mrc-ide/covid-sim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
39 lines (26 loc) · 790 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
29
30
31
32
33
34
35
36
37
38
39
FROM debian:stable AS build
WORKDIR /src
COPY . .
RUN mkdir -p build \
&& ./ci/install_dependencies.sh
WORKDIR /src/build
RUN cmake .. \
&& make
# This allows for building a release without having to potentially re-run the tests.
FROM debian:stable-slim AS release
# Install runtime dependencies.
RUN apt-get update \
&& apt-get install -y --no-install-recommends libgomp1 \
&& apt-get clean -y \
&& apt-get autoremove -y \
&& rm -rf /var/lib/apt/lists/*
COPY --from=build /src/build/src/CovidSim /usr/bin/.
COPY data /data/input
ENTRYPOINT ["/usr/bin/CovidSim"]
FROM build AS test
WORKDIR /src/build
RUN pwd \
&& ls -l \
&& make test ARGS="-V"
# This ensures that the default behavior is to run the tests and then create a release
FROM release