Skip to content

Commit 9b3f23b

Browse files
committed
Use buildpack-deps as the builder base image
Get some of the NsJail build dependencies pre-installed thanks to the base image.
1 parent fae8053 commit 9b3f23b

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

Dockerfile

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,17 @@
11
# syntax=docker/dockerfile:1
2-
FROM python:3.11-slim-buster as builder
2+
FROM buildpack-deps:buster as builder
33

44
WORKDIR /nsjail
55

66
RUN apt-get -y update \
7-
&& apt-get install -y \
7+
&& apt-get install -y --no-install-recommends \
88
bison\
99
flex \
10-
g++ \
11-
gcc \
12-
git \
1310
libprotobuf-dev\
1411
libnl-route-3-dev \
15-
make \
16-
pkg-config \
17-
protobuf-compiler
12+
protobuf-compiler \
13+
&& rm -rf /var/lib/apt/lists/*
14+
1815
RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \
1916
&& git checkout dccf911fd2659e7b08ce9507c25b2b38ec2c5800
2017
RUN make
@@ -30,7 +27,7 @@ ENV PATH=/root/.local/bin:$PATH \
3027
PIP_USER=1
3128

3229
RUN apt-get -y update \
33-
&& apt-get install -y \
30+
&& apt-get install -y --no-install-recommends \
3431
gcc \
3532
git \
3633
libnl-route-3-200 \

0 commit comments

Comments
 (0)