-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: - update Go version to v 1.21 - update VPP to v23.10 - update gotestsum to v1.11.0 - cleanup Dockerfile Signed-off-by: Ondrej Fabry <ondrej@fabry.dev>
- Loading branch information
1 parent
304bc5b
commit 14610b4
Showing
3 changed files
with
44 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,60 @@ | ||
ARG VPP_VERSION=v23.06 | ||
ARG UBUNTU_VERSION=20.04 | ||
ARG VPP_VERSION=v23.10 | ||
ARG UBUNTU_VERSION=22.04 | ||
|
||
FROM ubuntu:${UBUNTU_VERSION} as vppbuild | ||
ARG VPP_VERSION | ||
RUN apt-get update | ||
RUN DEBIAN_FRONTEND=noninteractive TZ=US/Central apt-get install -y git make python3 sudo asciidoc | ||
|
||
RUN set -eux;\ | ||
apt-get update && env DEBIAN_FRONTEND=noninteractive TZ=US/Central apt-get install -y \ | ||
asciidoc \ | ||
ca-certificates \ | ||
git \ | ||
iproute2 \ | ||
iputils-ping \ | ||
make \ | ||
python3 \ | ||
sudo \ | ||
tcpdump \ | ||
rm -rf /var/lib/apt/lists/* | ||
|
||
RUN git clone https://github.com/FDio/vpp.git | ||
|
||
WORKDIR /vpp | ||
|
||
ARG VPP_VERSION | ||
RUN git checkout ${VPP_VERSION} | ||
#COPY patch/ patch/ | ||
#RUN test -x "patch/patch.sh" && ./patch/patch.sh || exit 1 | ||
RUN DEBIAN_FRONTEND=noninteractive TZ=US/Central UNATTENDED=y make install-dep | ||
RUN make pkg-deb | ||
RUN ./src/scripts/version > /vpp/VPP_VERSION | ||
|
||
RUN set -eux; \ | ||
env DEBIAN_FRONTEND=noninteractive TZ=US/Central UNATTENDED=y make install-dep | ||
RUN set -eux; \ | ||
make pkg-deb \ | ||
./src/scripts/version > /vpp/VPP_VERSION | ||
|
||
FROM vppbuild as vppinstall | ||
#COPY --from=vppbuild /var/lib/apt/lists/* /var/lib/apt/lists/ | ||
#COPY --from=vppbuild [ "/vpp/build-root/libvppinfra_*_amd64.deb", "/vpp/build-root/vpp_*_amd64.deb", "/vpp/build-root/vpp-plugin-core_*_amd64.deb", "/vpp/build-root/vpp-plugin-dpdk_*_amd64.deb", "/pkg/"] | ||
#RUN VPP_INSTALL_SKIP_SYSCTL=false apt install -f -y --no-install-recommends /pkg/*.deb ca-certificates iputils-ping iproute2 tcpdump; \ | ||
# rm -rf /var/lib/apt/lists/*; \ | ||
# rm -rf /pkg | ||
RUN VPP_INSTALL_SKIP_SYSCTL=false apt install -f -y --no-install-recommends /vpp/build-root/*.deb ca-certificates iputils-ping iproute2 tcpdump; \ | ||
|
||
RUN set -eux; \ | ||
env VPP_INSTALL_SKIP_SYSCTL=false apt install -f -y --no-install-recommends /vpp/build-root/*.deb ; \ | ||
rm -rf /var/lib/apt/lists/*; \ | ||
rm -rf /pkg | ||
|
||
FROM golang:1.20-alpine3.18 as binapi-generator | ||
FROM golang:1.21-alpine3.19 as binapi-generator | ||
|
||
ENV GO111MODULE=on | ||
ENV CGO_ENABLED=0 | ||
ENV GOBIN=/bin | ||
|
||
ARG GOVPP_VERSION | ||
|
||
COPY . /govpp | ||
|
||
WORKDIR /govpp | ||
|
||
RUN go build -o /bin/binapi-generator ./cmd/binapi-generator | ||
|
||
FROM binapi-generator as gen | ||
|
||
COPY --from=vppinstall /usr/share/vpp/api/ /usr/share/vpp/api/ | ||
COPY --from=vppinstall /vpp/VPP_VERSION /VPP_VERSION | ||
|
||
WORKDIR /gen/binapi | ||
CMD VPP_VERSION=$(cat /VPP_VERSION) go generate . | ||
|
||
CMD VPP_VERSION=$(cat /VPP_VERSION) go generate . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters