Skip to content

Commit

Permalink
[#13] Upgrade docker image to ubuntu 20.04
Browse files Browse the repository at this point in the history
  • Loading branch information
navarrothiago committed May 29, 2021
1 parent edc0fae commit 8612dd5
Show file tree
Hide file tree
Showing 4 changed files with 93 additions and 7 deletions.
15 changes: 12 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ TEST_DIR=$(PROJECT_DIR)/build/Debug
NUM_THREADS=8

# Interface to be configured with veth pair.
DEVICE_IN=enp0s20f0u9
DEVICE_OUT=veth0
DEVICE_IN=enp1s0f1
DEVICE_OUT=enp0s20f0u8

.PHONY: help

Expand Down Expand Up @@ -76,16 +76,25 @@ docker-build: ## Build docker image
run-spgwu: ## Run spgwu
$(PROJECT_DIR)/build/spgw_u/build/spgwu -c ./etc/spgw_u-dev.conf -o

run-spgwu-test: force-xdp-deload ## Run spgwu test
$(PROJECT_DIR)/build/spgw_u/build/test/spgwu-test --gtest_filter=SpgwuTests.send_session_establishment_request

kill-spgwu: ## Kill spgwu
echo "TODO"

# TODO navarrothiago - include from upf-bpf, avoiding hardcoded.
config-veth-pair: ## Config veth pair. It must be run before <run-*> targets
sudo ./build/ext/upf-bpf/tests/scripts/config_veth_pair

setup: docker-config-spgwu-iface config-veth-pair ## Install upf-bpf dependencies
setup-upf-bpf: ## Setup upf-bpf dependency
cd build/ext/upf-bpf/ && \
make setup && \
cd ../../../

setup: docker-config-spgwu-iface config-veth-pair setup-upf-bpf install-upf-bpf ## Setup upf-bpf dependencies

install-upf-bpf: ## Install upf-bpf headers and library.
cd build/ext/upf-bpf/ && \
make install && \
cd ../../../

Expand Down
2 changes: 1 addition & 1 deletion build/scripts/build_helper
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ get_distribution_release() {
check_supported_distribution() {
local distribution=$(get_distribution_release)
case "$distribution" in
"ubuntu18.04") return 0 ;;
"ubuntu20.04") return 0 ;;
#"rhel7") return 0 ;;
#"centos7") return 0 ;;
esac
Expand Down
2 changes: 1 addition & 1 deletion build/scripts/build_helper.spgw
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,7 @@ check_install_spgwu_deps() {
guile-2.0-dev \
libcurl4-gnutls-dev \
libevent-dev \
libgcrypt11-dev \
libgcrypt20-dev \
libgmp-dev \
libhogweed? \
libidn2-0-dev \
Expand Down
81 changes: 79 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ubuntu:18.04
FROM ubuntu:20.04

ARG GIT_TAG=2019.w47
ARG UID=1000
Expand All @@ -17,6 +17,11 @@ RUN git clone --depth=1 --branch=$GIT_TAG https://github.com/navarrothiago/opena

RUN git clone --depth=1 --branch=master https://github.com/gabime/spdlog.git openair-cn-cups/build/ext/spdlog

ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=America/Sao_Pauloa
RUN apt-get update && \
apt-get install -y tzdata

RUN apt-get update && \
apt-get -y install cmake

Expand Down Expand Up @@ -129,7 +134,79 @@ RUN apt-get update && \
RUN apt-get update && \
apt-get -y install libssl-dev && \
wget -c https://github.com/Kitware/CMake/releases/download/v3.16.3/cmake-3.16.3.tar.gz -O - | tar -xz && \
cd cmake-3.16.3 && ./bootstrap && make -j4 && make install; fi
cd cmake-3.16.3 && ./bootstrap && make -j4 && make install
#fi

# TODO: pass as ARG
RUN echo "ENV_FILE=/workspaces/openair-cn-cups/env.sh" >> /etc/environment


# BEGIN - Open-Air-Interface packages (check scritpts in scripts folder)
RUN apt-get update && \
apt-get -y install \
autoconf \
automake \
bison \
build-essential \
cmake \
doxygen \
flex \
gdb \
git \
libconfig++-dev libasio-dev libboost-all-dev \
guile-2.0-dev \
libcurl4-gnutls-dev \
libevent-dev \
libgcrypt20-dev \
libgmp-dev \
libhogweed? \
libidn2-0-dev \
libidn11-dev \
libpthread-stubs0-dev \
libssl-dev \
libtool \
libxml2 \
libxml2-dev \
openssl \
python \
pkg-config

RUN apt-get update && \
apt-get -y install \
g++ \
cmake \
libboost-all-dev \
libevent-dev \
libdouble-conversion-dev \
libgoogle-glog-dev \
libgflags-dev \
libiberty-dev \
liblz4-dev \
liblzma-dev \
libsnappy-dev \
make \
zlib1g-dev \
binutils-dev \
libjemalloc-dev \
libssl-dev \
pkg-config

RUN cd /tmp; \
git clone https://github.com/facebook/folly.git; \
cd folly; \
git checkout -f v2019.11.11.00; \
mkdir _build && cd _build; \
cmake ..; \
make -j $(nproc); \
make install

RUN apt-get update && \
apt-get -y install \
iproute2 \
ethtool \
iptables \
vlan
# END - Open-Air-Interface packages (check build_helper)

USER root
#USER $UNAME
Expand Down

0 comments on commit 8612dd5

Please sign in to comment.