This repository was archived by the owner on Apr 8, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 67
/
Copy pathDockerfile
66 lines (45 loc) · 1.89 KB
/
Dockerfile
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
# To build:
# docker build --rm -t vpp-centos-userspace-cni .
#
# -------- Builder stage.
FROM centos:8@sha256:a27fd8080b517143cbbbab9dfb7c8571c40d67d534bbdee55bd6c473f432b177
SHELL ["/bin/bash", "-o", "pipefail", "-c"]
# Install VPP - Needed by CNI-VPP
RUN curl -s https://packagecloud.io/install/repositories/fdio/release/script.rpm.sh | bash
RUN yum install -y epel-release
RUN yum install -y epel-release vpp-plugins vpp-devel vpp-api-python vpp-api-lua; yum clean all
#
# Download and Build Container usrsp-app
#
# Pull in GO
RUN rpm --import https://mirror.go-repo.io/centos/RPM-GPG-KEY-GO-REPO && curl -s https://mirror.go-repo.io/centos/go-repo.repo | tee /etc/yum.repos.d/go-repo.repo
RUN yum install -y git golang make
# Build the usrsp-app
WORKDIR /root/go/src/
RUN go get github.com/intel/userspace-cni-network-plugin > /tmp/UserspaceDockerBuild.log 2>&1 || echo "Can ignore no GO files."
WORKDIR /root/go/src/github.com/intel/userspace-cni-network-plugin
RUN make extras
RUN cp docker/usrsp-app/usrsp-app /usr/sbin/usrsp-app
# -------- Import stage.
# Docker 17.05 or higher, remove ##
##FROM centos
# Install UserSpace CNI
##COPY --from=0 /usr/sbin/usrsp-app /usr/sbin/usrsp-app
# Install VPP
##RUN curl -s https://packagecloud.io/install/repositories/fdio/release/script.rpm.sh | bash
##RUN yum install -y epel-release
##RUN yum install -y vpp-plugins vpp-devel vpp-api-python vpp-api-lua; yum clean all
# Overwrite VPP systemfiles
COPY startup.conf /etc/vpp/startup.conf
COPY 80-vpp.conf /etc/sysctl.d/80-vpp.conf
# Install script to start both VPP and usrsp-app
COPY vppcni.sh vppcni.sh
# Setup VPP UserGroup and User
#RUN useradd --no-log-init -r -g vpp vpp
#USER vpp
# For Development, overwrite repo generated usrsp-app with local development binary.
# Needs to be commented out before each merge.
#COPY usrsp-app /usr/sbin/usrsp-app
CMD ["bash", "-C", "./vppcni.sh"]
#CMD [ "./vppcni.sh" ]