Skip to content

Commit

Permalink
Dockerfile: install packages before copying the directory
Browse files Browse the repository at this point in the history
This allows Docker to cache the installation of packages.
  • Loading branch information
mathstuf committed Sep 12, 2017
1 parent 19e7a22 commit c360dd4
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,21 @@
# build with: docker build -t nativejson-benchmark .
FROM debian:jessie

RUN buildDeps='build-essential gcc-multilib g++-multilib git-core curl ca-certificates php5-cli libboost-all-dev'; \
set -x \
&& apt-get update && apt-get install --no-install-recommends -y $buildDeps

COPY . /nativejson-benchmark
WORKDIR /nativejson-benchmark
ENV PATH $PATH:/nativejson-benchmark/build

RUN buildDeps='build-essential gcc-multilib g++-multilib git-core curl ca-certificates php5-cli libboost-all-dev'; \
set -x \
&& apt-get update && apt-get install --no-install-recommends -y $buildDeps \
&& cd /nativejson-benchmark \
&& git submodule update --init \
&& cd build \
RUN set-x \
&& cd /nativejson-benchmark/build \
&& 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 \
&& chmod +x premake5 && chmod +x premake.sh && sync && /bin/sh -c ./premake.sh && ./machine.sh \
&& cd /nativejson-benchmark && make \
&& cd /nativejson-benchmark/bin \
&& for t in *; do ./$t; done \
&& cd /nativejson-benchmark/result && make \
&& apt-get purge -y --auto-remove $buildDeps
&& cd /nativejson-benchmark/result && make

VOLUME ["/nativejson-benchmark/output"]

0 comments on commit c360dd4

Please sign in to comment.