forked from travelping/upg-vpp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.build
31 lines (27 loc) · 1.24 KB
/
Dockerfile.build
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# syntax = docker/dockerfile:experimental
FROM ubuntu:bionic AS build-stage
WORKDIR /
ENV BUILDKIT_VERSION "v0.7.1"
ENV BUILDCTL_SHA256 "a39e44735e9cdcbe27ef22179ef990de1024f2dc69665fed1c2a5431ff73ed9c"
COPY vpp/Makefile /src/vpp/Makefile
COPY vpp/build/external /src/vpp/build/external
# netbase is needed for Scapy
RUN --mount=target=/var/lib/apt/lists,type=cache,sharing=private \
--mount=target=/var/cache/apt,type=cache,sharing=private \
apt-get update && \
apt-get dist-upgrade -yy && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
build-essential sudo git netbase curl ca-certificates && \
curl -sSL "https://github.com/moby/buildkit/releases/download/${BUILDKIT_VERSION}/buildkit-${BUILDKIT_VERSION}.linux-amd64.tar.gz" | \
tar -xvz -C /usr/local bin/buildctl && \
echo "${BUILDCTL_SHA256} /usr/local/bin/buildctl" | sha256sum -c && \
cd /src/vpp && \
git config --global user.email "[email protected]" && \
git config --global user.name "dummy user" && \
git init && \
git add Makefile && \
git commit -m "dummy commit" && \
git tag -a v20.05-rc0 -m "dummy tag" && \
make UNATTENDED=yes install-dep install-ext-dep && \
apt-get clean && \
rm -rf /src/vpp