Commit 9f73f011 authored by Raphael Defosseux's avatar Raphael Defosseux

Merge branch 'feature/support_ubuntu22.04' into 'develop'

support for cgroup2 / ubuntu22: IS_CONTAINER is derived from IS_DOCKERBUILD...

See merge request oai/cn5g/oai-cn5g-smf!160
parents 2db8bca2 fdbc053a
......@@ -40,12 +40,14 @@ case "$OS_DISTRO" in
esac
IS_CONTAINER=`egrep -c "docker|kubepods|podman|buildah|libpod" /proc/self/cgroup || true`
IS_DOCKERBUILD=${IS_DOCKERFILE:-0}
if [ $IS_CONTAINER -eq 0 ]
if [ $IS_CONTAINER -eq 0 ] && [ $IS_DOCKERBUILD -eq 0 ]
then
SUDO='sudo -S -E'
else
SUDO=''
IS_CONTAINER=1
fi
###############################
......@@ -83,7 +85,7 @@ echo_info() { cecho "$*" $blue ;}
#-------------------------------------------------------------------------------
# From https://stackoverflow.com/questions/4023830/how-to-compare-two-strings-in-dot-separated-version-format-in-bash
# arg1 is a dotted (or not) version number (ex 4.10.6.56-ubunutu)
# arg1 is a dotted (or not) version number (ex 4.10.6.56-ubunutu)
# arg2 is a dotted (or not) version number (ex 4.10.6.56-ubunutu)
# return 0 if $1 lower or equal $2, else 1
version_le() {
......@@ -177,8 +179,8 @@ disable_ipv6() {
# arg1 = version
# arg2 = req_version
#
function version_gt() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1";
function version_gt() {
test "$(printf '%s\n' "$@" | sort -V | head -n 1)" != "$1";
}
......@@ -318,5 +320,3 @@ set_openair_env(){
openair_path=${openair_path%/src/s6a/*}
export OPENAIRCN_DIR=$openair_path
}
......@@ -30,6 +30,8 @@
#---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi8/ubi:latest AS oai-smf-builder
ENV IS_DOCKERFILE=1
# Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement
......
......@@ -35,6 +35,7 @@ FROM $BASE_IMAGE as oai-smf-base
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
ENV IS_DOCKERFILE=1
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
......
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