diff options
author | 2023-08-07 19:45:43 -0700 | |
---|---|---|
committer | 2023-08-07 19:45:43 -0700 | |
commit | 9b3f23bd4ee35e857ff4ab69fa91891385ae2277 (patch) | |
tree | df7ad2b67f28ccbc8c8a243130395c2e1b47d295 | |
parent | Remove explicit package versions from Dockerfile (diff) |
Use buildpack-deps as the builder base image
Get some of the NsJail build dependencies pre-installed thanks to the
base image.
-rw-r--r-- | Dockerfile | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -1,20 +1,17 @@ # syntax=docker/dockerfile:1 -FROM python:3.11-slim-buster as builder +FROM buildpack-deps:buster as builder WORKDIR /nsjail RUN apt-get -y update \ - && apt-get install -y \ + && apt-get install -y --no-install-recommends \ bison\ flex \ - g++ \ - gcc \ - git \ libprotobuf-dev\ libnl-route-3-dev \ - make \ - pkg-config \ - protobuf-compiler + protobuf-compiler \ + && rm -rf /var/lib/apt/lists/* + RUN git clone -b master --single-branch https://github.com/google/nsjail.git . \ && git checkout dccf911fd2659e7b08ce9507c25b2b38ec2c5800 RUN make @@ -30,7 +27,7 @@ ENV PATH=/root/.local/bin:$PATH \ PIP_USER=1 RUN apt-get -y update \ - && apt-get install -y \ + && apt-get install -y --no-install-recommends \ gcc \ git \ libnl-route-3-200 \ |