Skip to content

Commit c360dd4

Browse files
committed
Dockerfile: install packages before copying the directory
This allows Docker to cache the installation of packages.
1 parent 19e7a22 commit c360dd4

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

Dockerfile

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,21 @@
22
# build with: docker build -t nativejson-benchmark .
33
FROM debian:jessie
44

5+
RUN buildDeps='build-essential gcc-multilib g++-multilib git-core curl ca-certificates php5-cli libboost-all-dev'; \
6+
set -x \
7+
&& apt-get update && apt-get install --no-install-recommends -y $buildDeps
8+
59
COPY . /nativejson-benchmark
610
WORKDIR /nativejson-benchmark
711
ENV PATH $PATH:/nativejson-benchmark/build
812

9-
RUN buildDeps='build-essential gcc-multilib g++-multilib git-core curl ca-certificates php5-cli libboost-all-dev'; \
10-
set -x \
11-
&& apt-get update && apt-get install --no-install-recommends -y $buildDeps \
12-
&& cd /nativejson-benchmark \
13-
&& git submodule update --init \
14-
&& cd build \
13+
RUN set-x \
14+
&& cd /nativejson-benchmark/build \
1515
&& curl -L -s https://github.com/premake/premake-core/releases/download/v5.0.0-alpha7/premake-5.0.0-alpha7-linux.tar.gz | tar -xvz \
1616
&& chmod +x premake5 && chmod +x premake.sh && sync && /bin/sh -c ./premake.sh && ./machine.sh \
1717
&& cd /nativejson-benchmark && make \
1818
&& cd /nativejson-benchmark/bin \
1919
&& for t in *; do ./$t; done \
20-
&& cd /nativejson-benchmark/result && make \
21-
&& apt-get purge -y --auto-remove $buildDeps
20+
&& cd /nativejson-benchmark/result && make
2221

2322
VOLUME ["/nativejson-benchmark/output"]

0 commit comments

Comments
 (0)