Commit 2409d789 authored by sagar arora's avatar sagar arora

updated dockerfile ubuntu,rhel and smf.conf

parent 0c2292c9
......@@ -111,6 +111,7 @@ WORKDIR /openair-smf
EXPOSE 80/tcp 9090/tcp 8805/udp
CMD ["/openair-smf/bin/oai_smf", "-c", "/openair-smf/etc/smf.conf", "-o"]
ENTRYPOINT ["/openair-smf/bin/entrypoint.sh"]
#CMD ["sleep", "infinity"]
#CMD ["sleep", "infinity"]
\ No newline at end of file
......@@ -77,6 +77,7 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && DE
# 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/x86_64-linux-gnu/libboost_system.so.1.65.1 /usr/lib/x86_64-linux-gnu/
......@@ -91,3 +92,9 @@ COPY --from=oai-smf-builder /openair-smf/etc/smf.conf .
WORKDIR /openair-smf
# expose ports
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"]
\ No newline at end of file
......@@ -106,9 +106,9 @@ SMF =
NRF :
{
IPV4_ADDRESS = "192.168.12.100"; # YOUR NRF CONFIG HERE
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
IPV4_ADDRESS = "@NRF_IPV4_ADDRESS@"; # YOUR NRF CONFIG HERE
PORT = @NRF_PORT@; # YOUR NRF CONFIG HERE (default: 80)
API_VERSION = "@NRF_API_VERSION@"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
};
UPF_LIST = (
......
......@@ -2,19 +2,19 @@
set -euo pipefail
CONFIG_DIR="/oai-cn5g-smf/etc"
PUSH_PROTOCOL_OPTION=${PUSH_PROTOCOL_OPTION:-no}
CONFIG_DIR="/openair-smf/etc"
for c in ${CONFIG_DIR}/*.conf; do
# grep variable names (format: ${VAR}) from template to be rendered
VARS=$(grep -oP '@[a-zA-Z0-9_]+@' ${c} | sort | uniq | xargs)
echo "Now setting these variables '${VARS}'"
# create sed expressions for substituting each occurrence of ${VAR}
# with the value of the environment variable "VAR"
EXPRESSIONS=""
for v in ${VARS}; do
NEW_VAR=`echo $v | sed -e "s#@##g"`
if [[ "${!NEW_VAR}x" == "x" ]]; then
NEW_VAR=`echo $v | sed -e "s#@##g"`
if [[ -z ${!NEW_VAR+x} ]]; then
echo "Error: Environment variable '${NEW_VAR}' is not set." \
"Config file '$(basename $c)' requires all of $VARS."
exit 1
......@@ -26,5 +26,5 @@ for c in ${CONFIG_DIR}/*.conf; do
# render template and inline replace config file
sed -i "${EXPRESSIONS}" ${c}
done
exec "$@"
echo "Done setting the configuration"
exec "$@"
\ No newline at end of file
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