Commit bd7faec2 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

[DOCKER] reformating


Signed-off-by: Raphael Defosseux's avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 853137b4
......@@ -21,8 +21,20 @@ FROM ubuntu:18.04 AS vpp-upf-builder
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
# Installing hyperscan library for upf plugin
RUN apt update && apt install git sudo wget make build-essential libhyperscan-dev -y
RUN apt update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
git \
sudo \
wget \
make \
build-essential \
libhyperscan-dev \
&& rm -rf /var/lib/apt/lists/*
# Some GIT configuration commands quite useful
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
......@@ -33,15 +45,19 @@ WORKDIR /vpp-upf
COPY scripts/ /vpp-upf/scripts
# Applying vpp patches
RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && cd vpp/ && git checkout -b downstream
RUN git clone https://github.com/travelping/upg-vpp.git
RUN mv upg-vpp/upf/ vpp/src/plugins/
RUN mv upg-vpp/vpp-patches/* scripts/patches/
RUN mv upg-vpp/vpp.spec /
RUN ./scripts/apply_vpp_patches.sh
RUN touch /etc/apt/apt.conf.d/90forceyes
RUN echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes
RUN echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes
RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && \
git clone https://github.com/travelping/upg-vpp.git && \
# For the moment let us fix a given commit
cd upg-vpp && \
git checkout -f 4d32e1721c1e9a1bd7ea861658f502a64f9b4073 && \
cd .. && \
mv upg-vpp/upf/ vpp/src/plugins/ && \
mv upg-vpp/vpp-patches/* scripts/patches/ && \
mv upg-vpp/vpp.spec / && \
./scripts/apply_vpp_patches.sh && \
touch /etc/apt/apt.conf.d/90forceyes && \
echo "APT::Get::Assume-Yes "true";" >> /etc/apt/apt.conf.d/90forceyes && \
echo "APT::Get::force-yes "true";" >> /etc/apt/apt.conf.d/90forceyes
# To Do - remove unnecessary pulgin build to optimise build time e.g. ipsec, dpdk etc.
......@@ -51,17 +67,19 @@ RUN make install-dep build-release -C vpp
#---------------------------------------------------------------------
# TARGET IMAGE
#---------------------------------------------------------------------
FROM ubuntu:bionic as vpp-upg
FROM ubuntu:bionic as vpp-upf
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && DEBIAN_FRONTEND=noninteractive apt-get install --yes \
net-tools \
tshark \
tzdata\
openssl \
libhyperscan-dev \
iproute2 \
vim \
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
net-tools \
tshark \
tzdata\
openssl \
libhyperscan-dev \
iproute2 \
vim \
&& rm -rf /var/lib/apt/lists/*
WORKDIR /openair-upf/bin/
......
......@@ -5,23 +5,23 @@ $ git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp.git
$ cd oai-cn5g-upf-vpp
$ git checkout vpp-upf
$ git checkout develop
```
# 2. Generic Parameters #
Here in our network configuration, we need to pass the "GIT PROXY" configuration.
* If you do not need, remove the `--build-arg EURECOM_PROXY=".."` option.
* If you do not need, remove the `--build-arg NEEDED_GIT_PROXY=".."` option.
* If you do need it, change with your proxy value.
# 3. Build vpp-upf image #
## 3.1 On a Ubuntu 18.04 Host ##
```bash
$ docker build --target vpp-upg --tag vpp-upg:latest \
$ docker build --target vpp-upf --tag vpp-upf:latest \
--file docker/Dockerfile.ubuntu.18.04 \
--build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" .
--build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
```
## 3.2 On a CentOS 8 Host ##
......
# 1. Retrieve the proper code version #
```bash
$ git clone https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-upf-vpp.git
$ cd oai-cn5g-upf-vpp
$ git checkout vpp-upf
```
# 2. Generic Parameters #
Here in our network configuration, we need to pass the "GIT PROXY" configuration.
* If you do not need, remove the `--build-arg EURECOM_PROXY=".."` option.
* If you do need it, change with your proxy value.
# 3. Build vpp-upf source #
## 3.1 On a Docker Ubuntu 18.04 Host ##
```bash
$ docker build --tag vpp-upg:dev \
--file docker/Dockerfile.ubuntu.18.04.dev \
--build-arg EURECOM_PROXY="http://proxy.eurecom.fr:8080" .
```
or
## 3.1 On a Ubuntu 18.04 Native ##
### Install VPP-UPF software dependencies
```bash
ubuntu@test-upf:~$ cd oai-cn5g-upf-vpp/
ubuntu@test-upf:~/oai-cn5g-upf-vpp$ cd ./build/scripts
ubuntu@test-upf:~/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -I -f
```
### Build VPP-UPF
//TO DO
```bash
ubuntu@test-upf:~/oai-cn5g-upf-vpp/build/scripts$ ./build_vpp_upf -c -V -b Debug -j
```
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment