Commit b568e219 authored by Raphael Defosseux's avatar Raphael Defosseux

Docker: cleanup

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@eurecom.fr>
parent 6337046a
...@@ -32,20 +32,10 @@ FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upg-builder ...@@ -32,20 +32,10 @@ FROM registry.access.redhat.com/ubi7/ubi:latest AS vpp-upg-builder
ARG NEEDED_GIT_PROXY ARG NEEDED_GIT_PROXY
#Build inside cluster
#COPY ./etc-pki-entitlement /etc/pki/entitlement
#COPY ./rhsm-conf /etc/rhsm
#COPY ./rhsm-ca /etc/rhsm/ca
COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca COPY tmp/ca/redhat-uep.pem /etc/rhsm/ca
COPY tmp/entitlement/*.pem /etc/pki/entitlement COPY tmp/entitlement/*.pem /etc/pki/entitlement
#ENV DEBIAN_FRONTEND=noninteractive
#ENV TZ=Europe
#RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN rm -f /etc/rhsm-host && \ RUN rm -f /etc/rhsm-host && \
#yum repolist --disablerepo=* && \
subscription-manager repos --enable rhel-server-rhscl-7-rpms && \ subscription-manager repos --enable rhel-server-rhscl-7-rpms && \
subscription-manager repos --enable rhel-7-server-optional-rpms && \ subscription-manager repos --enable rhel-7-server-optional-rpms && \
yum update -y && \ yum update -y && \
...@@ -61,8 +51,8 @@ RUN rm -f /etc/rhsm-host && \ ...@@ -61,8 +51,8 @@ RUN rm -f /etc/rhsm-host && \
# Some GIT configuration command quite useful # Some GIT configuration command quite useful
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi" RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600 RUN git config --global https.postBuffer 123289600 && \
RUN git config --global http.sslverify false git config --global http.sslverify false
RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \ RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \
http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \ http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \
...@@ -84,26 +74,27 @@ RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && \ ...@@ -84,26 +74,27 @@ RUN git clone -b stable/2101 https://github.com/fdio/vpp.git && \
./scripts/apply_vpp_patches.sh ./scripts/apply_vpp_patches.sh
RUN make install-dep build-release -C vpp/ RUN make install-dep build-release -C vpp/
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# TARGET IMAGE # TARGET IMAGE
#--------------------------------------------------------------------- #---------------------------------------------------------------------
FROM registry.access.redhat.com/ubi7/ubi:latest as vpp-upg FROM registry.access.redhat.com/ubi7/ubi:latest as oai-upf-vpp
# We install some debug tools for the moment in addition of mandatory libraries # We install some debug tools for the moment in addition of mandatory libraries
RUN yum repolist --disablerepo=* && \ RUN yum repolist --disablerepo=* && \
yum update -y && \ yum update -y && \
#yum install -y --enablerepo="ubi-7-codeready-builder" \
yum install -y \ yum install -y \
net-tools \ net-tools \
iputils \ iputils \
tshark \ tshark \
iproute \ iproute \
wget \ wget && \
&& rm -rf /var/lib/apt/lists/* wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \
http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm && \
RUN wget http://repo.openfusion.net/centos7-x86_64/hyperscan-devel-5.3.0-1.of.el7.x86_64.rpm \ rpm -i *.rpm && \
http://repo.openfusion.net/centos7-x86_64/hyperscan-5.3.0-1.of.el7.x86_64.rpm \ rm *.rpm && \
&& rpm -i *.rpm && rm *.rpm && yum remove -y wget yum remove -y wget && \
rm -rf /var/lib/apt/lists/*
WORKDIR /openair-upf/bin WORKDIR /openair-upf/bin
COPY --from=vpp-upg-builder /vpp-upf/scripts/entrypoint.sh . COPY --from=vpp-upg-builder /vpp-upf/scripts/entrypoint.sh .
...@@ -128,6 +119,4 @@ COPY --from=vpp-upg-builder /vpp-upg/scripts/run.sh . ...@@ -128,6 +119,4 @@ COPY --from=vpp-upg-builder /vpp-upg/scripts/run.sh .
EXPOSE 8085/udp 2152/udp EXPOSE 8085/udp 2152/udp
ENTRYPOINT ["/openair-upg/bin/entrypoint.sh"] ENTRYPOINT ["/openair-upg/bin/entrypoint.sh"]
CMD ["/openair-upf/run.sh"] CMD ["/openair-upf/run.sh"]
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
FROM ubuntu:18.04 AS vpp-upf-builder FROM ubuntu:18.04 AS vpp-upf-builder
ARG NEEDED_GIT_PROXY ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
# Installing hyperscan library for upf plugin # Installing hyperscan library for upf plugin
...@@ -37,9 +36,9 @@ RUN apt update && \ ...@@ -37,9 +36,9 @@ RUN apt update && \
# Some GIT configuration commands quite useful # 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" RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
RUN git config --global https.postBuffer 123289600 RUN git config --global https.postBuffer 123289600 && \
RUN git config --global http.sslverify false git config --global http.sslverify false
WORKDIR /vpp-upf WORKDIR /vpp-upf
COPY scripts/ /vpp-upf/scripts COPY scripts/ /vpp-upf/scripts
...@@ -67,9 +66,10 @@ RUN make install-dep build-release -C vpp ...@@ -67,9 +66,10 @@ RUN make install-dep build-release -C vpp
#--------------------------------------------------------------------- #---------------------------------------------------------------------
# TARGET IMAGE # TARGET IMAGE
#--------------------------------------------------------------------- #---------------------------------------------------------------------
FROM ubuntu:bionic as vpp-upg FROM ubuntu:bionic as oai-upf-vpp
ENV DEBIAN_FRONTEND=noninteractive ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris ENV TZ=Europe/Paris
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 \
...@@ -104,6 +104,4 @@ COPY --from=vpp-upf-builder /vpp-upf/scripts/run.sh /openair-upf/run.sh ...@@ -104,6 +104,4 @@ COPY --from=vpp-upf-builder /vpp-upf/scripts/run.sh /openair-upf/run.sh
#EXPOSE 8085/udp 2152/udp #EXPOSE 8085/udp 2152/udp
ENTRYPOINT ["/openair-upf/bin/entrypoint.sh"] ENTRYPOINT ["/openair-upf/bin/entrypoint.sh"]
CMD ["/openair-upf/run.sh"] CMD ["/openair-upf/run.sh"]
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