Commit d7c3806f authored by Robert Schmidt's avatar Robert Schmidt

Use tini as init in all containers

- Print problems, e.g., segfault
- Handle signals and zombie processes properly
parent ebe1b711
......@@ -58,6 +58,12 @@ RUN rm -f /etc/rhsm-host && \
echo "/usr/local/lib" > /etc/ld.so.conf.d/local-lib.conf && \
echo "/usr/local/lib64" >> /etc/ld.so.conf.d/local-lib.conf
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
# it will be copied into target containers, to print exit numbers and handle signals properly
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
# In some network environments, GIT proxy is required
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
......
......@@ -46,6 +46,12 @@ RUN dnf install 'dnf-command(config-manager)' -y && \
python3-pip && \
pip3 install --ignore-installed pyyaml
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
# it will be copied into target containers, to print exit numbers and handle signals properly
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
#create the WORKDIR
WORKDIR /oai-ran
COPY . .
......
......@@ -46,6 +46,12 @@ RUN apt-get update && \
python3-pip && \
pip3 install --ignore-installed pyyaml
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
# it will be copied into target containers, to print exit numbers and handle signals properly
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
# In some network environments, GIT proxy is required
RUN /bin/bash -c "if [[ -v NEEDED_GIT_PROXY ]]; then git config --global http.proxy $NEEDED_GIT_PROXY; fi"
......
......@@ -73,6 +73,12 @@ RUN apt-get update && \
g++-9-aarch64-linux-gnu && \
apt-get clean
# Add "Tini - A tiny but valid init for containers", https://github.com/krallin/tini
# it will be copied into target containers, to print exit numbers and handle signals properly
ENV TINI_VERSION v0.19.0
ADD https://github.com/krallin/tini/releases/download/${TINI_VERSION}/tini /tini
RUN chmod +x /tini
# create the WORKDIR
WORKDIR /oai-ran
COPY . .
......
......@@ -112,5 +112,6 @@ WORKDIR /opt/oai-enb
# 36422 --> X2C, SCTP/UDP
EXPOSE 2152/udp 36412/udp 36422/udp
ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
COPY --from=enb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-enb/bin/entrypoint.sh"]
CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
......@@ -122,5 +122,6 @@ WORKDIR /opt/oai-enb
# 36422 --> X2C, SCTP/UDP
EXPOSE 2152/udp 36412/udp 36422/udp
ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
COPY --from=enb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-enb/bin/entrypoint.sh"]
CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
......@@ -112,5 +112,6 @@ EXPOSE 2152/udp 36412/udp 36422/udp
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-enb/bin/entrypoint.sh"]
COPY --from=enb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-enb/bin/entrypoint.sh"]
CMD ["/opt/oai-enb/bin/lte-softmodem", "-O", "/opt/oai-enb/etc/enb.conf"]
......@@ -86,5 +86,6 @@ RUN ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/libthirdparty_tra
WORKDIR /opt/oai-gnb-aw2s
ENTRYPOINT ["/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
......@@ -95,5 +95,6 @@ RUN ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/libthirdparty_tra
WORKDIR /opt/oai-gnb-aw2s
ENTRYPOINT ["/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
......@@ -81,5 +81,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/libaw2sori_transpro.so /usr/local/lib/lib
WORKDIR /opt/oai-gnb-aw2s
ENTRYPOINT ["/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb-aw2s/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb-aw2s/bin/nr-softmodem", "-O", "/opt/oai-gnb-aw2s/etc/gnb.conf"]
......@@ -111,5 +111,6 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -121,5 +121,6 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -108,5 +108,6 @@ WORKDIR /opt/oai-gnb
#EXPOSE 50000/udp # IF5 / ORI (control)
#EXPOSE 50001/udp # IF5 / ECPRI (data)
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-softmodem", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -95,5 +95,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
WORKDIR /opt/oai-lte-ru
ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
COPY --from=ru-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-lte-ru/bin/entrypoint.sh"]
CMD ["/opt/oai-lte-ru/bin/oairu", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
......@@ -88,5 +88,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
WORKDIR /opt/oai-lte-ru
ENTRYPOINT ["/opt/oai-lte-ru/bin/entrypoint.sh"]
COPY --from=ru-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-lte-ru/bin/entrypoint.sh"]
CMD ["/opt/oai-lte-ru/bin/oairu", "-O", "/opt/oai-lte-ru/etc/rru.conf"]
......@@ -104,5 +104,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
ldconfig
WORKDIR /opt/oai-lte-ue
COPY --from=lte-ue-base /tini /tini
CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-lte-ue/bin/entrypoint.sh"]
......@@ -116,5 +116,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
echo "ldd on libtelnetsrv.so" && ldd /usr/local/lib/libtelnetsrv.so
WORKDIR /opt/oai-lte-ue
COPY --from=lte-ue-base /tini /tini
CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-lte-ue/bin/entrypoint.sh"]
......@@ -104,5 +104,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
ldd /opt/oai-lte-ue/bin/lte-uesoftmodem
WORKDIR /opt/oai-lte-ue
COPY --from=lte-ue-base /tini /tini
CMD ["/opt/oai-lte-ue/bin/lte-uesoftmodem"]
ENTRYPOINT ["/opt/oai-lte-ue/bin/entrypoint.sh"]
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-lte-ue/bin/entrypoint.sh"]
......@@ -75,5 +75,6 @@ WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -76,5 +76,6 @@ WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -66,5 +66,6 @@ RUN ldconfig && ldd /opt/oai-gnb/bin/nr-cuup
WORKDIR /opt/oai-gnb/etc
WORKDIR /opt/oai-gnb
ENTRYPOINT ["/opt/oai-gnb/bin/entrypoint.sh"]
COPY --from=gnb-base /tini /tini
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-gnb/bin/entrypoint.sh"]
CMD ["/opt/oai-gnb/bin/nr-cuup", "-O", "/opt/oai-gnb/etc/gnb.conf"]
......@@ -108,5 +108,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
WORKDIR /opt/oai-nr-ue
COPY --from=nr-ue-base /tini /tini
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-nr-ue/bin/entrypoint.sh"]
......@@ -117,5 +117,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
echo "ldd on libtelnetsrv_5Gue.so" && ldd /usr/local/lib/libtelnetsrv_5Gue.so
WORKDIR /opt/oai-nr-ue
COPY --from=nr-ue-base /tini /tini
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-nr-ue/bin/entrypoint.sh"]
......@@ -104,5 +104,6 @@ RUN /bin/bash -c "ln -s /usr/local/lib/liboai_usrpdevif.so /usr/local/lib/liboai
ldd /opt/oai-nr-ue/bin/nr-uesoftmodem
WORKDIR /opt/oai-nr-ue
COPY --from=nr-ue-base /tini /tini
CMD ["/opt/oai-nr-ue/bin/nr-uesoftmodem", "-O", "/opt/oai-nr-ue/etc/nr-ue.conf"]
ENTRYPOINT ["/opt/oai-nr-ue/bin/entrypoint.sh"]
ENTRYPOINT ["/tini", "-v", "--", "/opt/oai-nr-ue/bin/entrypoint.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