Commit fdbc053a authored by Romain Lacroix's avatar Romain Lacroix

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

support for cgroup2 / ubuntu22: IS_CONTAINER is derived from IS_DOCKERBUILD which is declared in Dockerfile
parent 2db8bca2
...@@ -40,12 +40,14 @@ case "$OS_DISTRO" in ...@@ -40,12 +40,14 @@ case "$OS_DISTRO" in
esac esac
IS_CONTAINER=`egrep -c "docker|kubepods|podman|buildah|libpod" /proc/self/cgroup || true` 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 then
SUDO='sudo -S -E' SUDO='sudo -S -E'
else else
SUDO='' SUDO=''
IS_CONTAINER=1
fi fi
############################### ###############################
...@@ -318,5 +320,3 @@ set_openair_env(){ ...@@ -318,5 +320,3 @@ set_openair_env(){
openair_path=${openair_path%/src/s6a/*} openair_path=${openair_path%/src/s6a/*}
export OPENAIRCN_DIR=$openair_path export OPENAIRCN_DIR=$openair_path
} }
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#--------------------------------------------------------------------- #---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi8/ubi:latest AS oai-smf-builder FROM registry.access.redhat.com/ubi8/ubi:latest AS oai-smf-builder
ENV IS_DOCKERFILE=1
# Copy the entitlements # Copy the entitlements
COPY ./etc-pki-entitlement /etc/pki/entitlement COPY ./etc-pki-entitlement /etc/pki/entitlement
......
...@@ -35,6 +35,7 @@ FROM $BASE_IMAGE as oai-smf-base ...@@ -35,6 +35,7 @@ FROM $BASE_IMAGE as oai-smf-base
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris ENV TZ=Europe/Paris
ENV IS_DOCKERFILE=1
RUN apt-get update && \ RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \ DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --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