-
Notifications
You must be signed in to change notification settings - Fork 94
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
143 additions
and
3 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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Define docker image repo/name:tag | ||
# Changing this will cause build/publish to occur in CI actions | ||
export DASH_ACR_REGISTRY=sonicdash.azurecr.io | ||
export DOCKER_VPP_IMG_NAME?=${DASH_ACR_REGISTRY}/dash-vpp-bldr | ||
export DOCKER_VPP_IMG_CTAG?=240118 |
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 |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# This Dockerfile builds an image used to compile vpp for dash date-plane app. | ||
FROM amd64/ubuntu:20.04 | ||
LABEL maintainer="SONIC-DASH Community" | ||
LABEL description="DASH date-plane app using vpp" | ||
|
||
# Configure make to run as many parallel jobs as cores available | ||
ARG available_processors | ||
ARG MAKEFLAGS=-j$available_processors | ||
|
||
ARG CC=gcc | ||
ARG CXX=g++ | ||
# Set TZ to avoid interactive installer | ||
ENV TZ=America/Los_Angeles | ||
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone | ||
ENV GIT_SSL_NO_VERIFY=true | ||
|
||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
git \ | ||
build-essential \ | ||
autoconf \ | ||
libtool \ | ||
pkg-config \ | ||
sudo \ | ||
iproute2 net-tools iputils-ping \ | ||
make | ||
|
||
## Install vpp | ||
RUN apt-get install -y curl | ||
RUN curl -s https://packagecloud.io/install/repositories/fdio/release/script.deb.sh | bash -x | ||
RUN apt-get update && \ | ||
apt-get install -y --no-install-recommends \ | ||
vpp vpp-plugin-core vpp-plugin-dpdk vpp-dbg vpp-dev | ||
|
||
# vpp development environment | ||
RUN echo "wireshark-common wireshark-common/install-setuid boolean true" | debconf-set-selections | ||
WORKDIR /var | ||
RUN (git clone https://gerrit.fd.io/r/vpp && \ | ||
cd vpp && UNATTENDED=y make install-dep) | ||
|
||
|
||
WORKDIR / | ||
|
||
ARG user | ||
ARG uid | ||
ARG group | ||
ARG guid | ||
ARG hostname | ||
|
||
ENV BUILD_HOSTNAME $hostname | ||
ENV USER $user | ||
|
||
RUN groupadd -f -r -g $guid $group | ||
RUN useradd $user -l -u $uid -g $guid -d /var/$user -m -s /bin/bash | ||
RUN echo "$user ALL=(ALL) NOPASSWD:ALL" >>/etc/sudoers | ||
|
||
USER $user | ||
|
||
CMD /bin/bash |