Commit e8cb6e5e authored by Raphael Defosseux's avatar Raphael Defosseux

DOCKER: fixes and cleanup on Ubuntu18 dockerfiles

Signed-off-by: default avatarRaphael Defosseux <raphael.defosseux@openairinterface.org>
parent 9f4346b3
......@@ -293,6 +293,8 @@ install_nghttp2_from_git() {
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
$SUDO make install
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
$SUDO ldconfig
ret=$?;[[ $ret -ne 0 ]] && popd && return $ret
popd
fi
echo "nghttp2 installation complete"
......
......@@ -53,23 +53,30 @@ RUN apt-get update && \
tzdata \
bc \
tshark \
perl \
openssl \
libasan4 \
libldap-2.4-2 \
libgoogle-glog0v5 \
libdouble-conversion1 \
libconfig++9v5 \
libcurl4-gnutls-dev \
&& rm -rf /var/lib/apt/lists/*
# Copying executable and generated libraries
WORKDIR /openair-smf/bin
COPY --from=oai-smf-builder /openair-smf/build/smf/build/smf oai_smf
COPY --from=oai-smf-builder /openair-smf/scripts/entrypoint.sh entrypoint.sh
COPY --from=oai-smf-builder /usr/local/lib/libpistache.so /usr/local/lib/
COPY --from=oai-smf-builder /usr/local/lib/libnghttp2_asio.so.1 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/libboost_system.so.1.65.1 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/libboost_thread.so.1.65.1 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/libboost_chrono.so.1.65.1 /usr/local/lib/
COPY --from=oai-smf-builder /openair-smf/build/smf/build/nas/libNAS.so /usr/local/lib/
COPY --from=oai-smf-builder /openair-smf/scripts/entrypoint.sh .
WORKDIR /usr/local/lib/
COPY --from=oai-smf-builder /usr/local/lib/libpistache.so .
COPY --from=oai-smf-builder /usr/local/lib/libnghttp2_asio.so.1 .
COPY --from=oai-smf-builder /usr/lib/libboost_system.so.1.67.0 .
COPY --from=oai-smf-builder /usr/lib/libboost_thread.so.1.67.0 .
COPY --from=oai-smf-builder /usr/lib/libboost_chrono.so.1.67.0 .
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 .
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/librtmp.so.1 .
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/libpsl.so.5 .
COPY --from=oai-smf-builder /openair-smf/build/smf/build/nas/libNAS.so .
RUN ldconfig
# Copying template configuration files
......@@ -82,5 +89,4 @@ WORKDIR /openair-smf
EXPOSE 80/tcp 9090/tcp 8805/udp
ENTRYPOINT ["/bin/bash","/openair-smf/bin/entrypoint.sh"]
CMD ["/openair-smf/bin/oai_smf", "-c", "/openair-smf/etc/smf.conf", "-o"]
......@@ -34,17 +34,19 @@ ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && DEBIAN_FRONTEND=noninteractive apt-get install --yes \
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
psmisc \
software-properties-common \
gnupg \
git \
&& rm -rf /var/lib/apt/lists/*
git && \
rm -rf /var/lib/apt/lists/*
# 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 git config --global https.postBuffer 123289600
RUN git config --global http.sslverify false
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi" && \
git config --global https.postBuffer 123289600 && \
git config --global http.sslverify false
# Copying source code
WORKDIR /openair-smf
......@@ -62,31 +64,38 @@ FROM ubuntu:bionic as oai-smf
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe/Paris
# We install some debug tools for the moment in addition of mandatory libraries
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && DEBIAN_FRONTEND=noninteractive apt-get install --yes \
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
psmisc \
net-tools \
tzdata \
bc \
tshark \
libconfig++-dev \
perl \
openssl \
libasan4 \
libldap-2.4-2 \
libgoogle-glog0v5 \
libdouble-conversion1 \
libconfig++9v5 \
libcurl4-gnutls-dev \
&& rm -rf /var/lib/apt/lists/*
# Copying executable and generated libraries
WORKDIR /openair-smf/bin
COPY --from=oai-smf-builder /openair-smf/build/smf/build/smf oai_smf
COPY --from=oai-smf-builder /openair-smf/scripts/entrypoint.sh entrypoint.sh
COPY --from=oai-smf-builder /usr/local/lib/libpistache.so /usr/local/lib/
COPY --from=oai-smf-builder /usr/local/lib/libnghttp2_asio.so.1 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/libboost_system.so.1.67.0 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/libboost_thread.so.1.67.0 /usr/local/lib/
COPY --from=oai-smf-builder /usr/lib/libboost_chrono.so.1.67.0 /usr/local/lib/
COPY --from=oai-smf-builder /openair-smf/scripts/entrypoint.sh .
COPY --from=oai-smf-builder /openair-smf/build/smf/build/nas/libNAS.so /usr/local/lib/
WORKDIR /usr/local/lib/
COPY --from=oai-smf-builder /usr/local/lib/libpistache.so .
COPY --from=oai-smf-builder /usr/local/lib/libnghttp2_asio.so.1 .
COPY --from=oai-smf-builder /usr/lib/libboost_system.so.1.67.0 .
COPY --from=oai-smf-builder /usr/lib/libboost_thread.so.1.67.0 .
COPY --from=oai-smf-builder /usr/lib/libboost_chrono.so.1.67.0 .
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/libcurl-gnutls.so.4 .
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/librtmp.so.1 .
COPY --from=oai-smf-builder /usr/lib/x86_64-linux-gnu/libpsl.so.5 .
COPY --from=oai-smf-builder /openair-smf/build/smf/build/nas/libNAS.so .
RUN ldconfig
# Copying template configuration files
......@@ -99,5 +108,4 @@ WORKDIR /openair-smf
EXPOSE 80/tcp 9090/tcp 8805/udp
ENTRYPOINT ["/bin/bash","/openair-smf/bin/entrypoint.sh"]
CMD ["/openair-smf/bin/oai_smf", "-c", "/openair-smf/etc/smf.conf", "-o"]
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