Skip to content

Commit

Permalink
Refactor using current official Dockerfile best practices
Browse files Browse the repository at this point in the history
Implement best practices for Dockerfiles as per the official
documentation:
https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/

Reduces image size from 451.6MB to 404.9MB.
  • Loading branch information
cstrouse committed Jun 13, 2017
1 parent 1dd3223 commit 76c7a23
Showing 1 changed file with 18 additions and 5 deletions.
23 changes: 18 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,21 @@
FROM ubuntu
FROM ubuntu:16.04

RUN apt-get -y update && apt-get install -y \
autoconf \
bison \
check \
flex \
gcc \
git \
libtool \
make \
pkg-config \
protobuf-c-compiler \
re2c \
&& rm -rf /var/lib/apt/lists/*

RUN apt-get -y update
RUN apt-get -y install autoconf bison check flex gcc git libtool make pkg-config protobuf-c-compiler re2c
RUN git clone https://github.com/google/nsjail.git
RUN cd /nsjail && make
RUN mv /nsjail/nsjail /bin && rm -rf -- /nsjail

WORKDIR /nsjail

RUN make && mv /nsjail/nsjail /bin && rm -rf -- /nsjail

0 comments on commit 76c7a23

Please sign in to comment.