Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-NRF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-NRF
Commits
328dbea9
Commit
328dbea9
authored
Feb 05, 2021
by
sagar arora
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dockerfile
parent
93f5a0ee
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
124 additions
and
0 deletions
+124
-0
docker/Dockerfile.ubuntu18.04
docker/Dockerfile.ubuntu18.04
+73
-0
docker/docker-compose.yaml
docker/docker-compose.yaml
+19
-0
docker/entrypoint.sh
docker/entrypoint.sh
+32
-0
No files found.
docker/Dockerfile.ubuntu18.04
0 → 100644
View file @
328dbea9
#---------------------------------------------------------------------
#
# Dockerfile for the Open-Air-Interface NRF service
# Valid for Ubuntu-18.04 (bionic)
#
#---------------------------------------------------------------------
#---------------------------------------------------------------------
# BUILDER IMAGE
#---------------------------------------------------------------------
FROM ubuntu:bionic as oai-nrf-builder
ARG NEEDED_GIT_PROXY
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && DEBIAN_FRONTEND=noninteractive apt-get install --yes \
psmisc \
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
# Copying source code
COPY . /openair-nrf
WORKDIR /openair-nrf
# Installing and Building NRF
WORKDIR /openair-nrf/build/scripts
RUN ./build_nrf --install-deps --force
RUN ./build_nrf --clean --Verbose --build-type Release --jobs
#---------------------------------------------------------------------
# TARGET IMAGE
#---------------------------------------------------------------------
FROM ubuntu:bionic as oai-nrf
ENV DEBIAN_FRONTEND=noninteractive
ENV TZ=Europe
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
# 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 \
psmisc \
net-tools \
iputils-ping \
bc \
tshark \
libasan4 \
libgoogle-glog0v5 \
libdouble-conversion1 \
libconfig++9v5 \
libcurl4-gnutls-dev \
&& rm -rf /var/lib/apt/lists/*
# Copying executable and generated libraries
WORKDIR /openair-nrf/bin
COPY --from=oai-nrf-builder /openair-nrf/build/nrf/build/nrf oai_nrf
COPY --from=oai-nrf-builder /usr/local/lib/libpistache.so /usr/local/lib/
COPY --from=oai-nrf-builder /usr/local/lib/libnghttp2_asio.so.1 /usr/local/lib/
COPY --from=oai-nrf-builder /usr/lib/x86_64-linux-gnu/libboost_system.so.1.65.1 /usr/lib/x86_64-linux-gnu/
COPY --from=oai-nrf-builder /usr/lib/x86_64-linux-gnu/libboost_thread.so.1.65.1 /usr/lib/x86_64-linux-gnu/
RUN ldconfig
# Copying template configuration files
COPY --from=oai-nrf-builder /openair-nrf/etc/nrf.conf /openair-nrf/etc/
COPY --from=oai-nrf-builder /openair-nrf/docker/entrypoint.sh /openair-nrf/
WORKDIR /openair-nrf
#ENTRYPOINT ["/openair-nrf/entrypoint.sh"]
docker/docker-compose.yaml
0 → 100644
View file @
328dbea9
version
:
'
3'
services
:
oai_nrf
:
container_name
:
"
oai_nrf"
image
:
oainrf:1.0
ports
:
-
8080:8080
-
9092:9092
environment
:
-
NRF_INTERFACE_NAME_FOR_SBI=eth0
-
NRF_INTERFACE_PORT_FOR_SBI=8080
-
NRF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
-
NRF_API_VERSION=v1
networks
:
default
:
driver
:
bridge
ipam
:
config
:
-
subnet
:
172.18.59.0/24
\ No newline at end of file
docker/entrypoint.sh
0 → 100755
View file @
328dbea9
#---------------------------------------------------------------------
#
# Docker entrypoint file for setting up environment variables and generating conf file
# Valid for Ubuntu-18.04 (bionic)
#
#---------------------------------------------------------------------
#!/bin/bash
INSTANCE
=
1
PREFIX
=
'/usr/local/etc/oai'
mkdir
-m
0777
-p
$PREFIX
cp
/openair-nrf/etc/nrf.conf
$PREFIX
declare
-A
NRF_CONF
NRF_CONF[@INSTANCE@]
=
$INSTANCE
NRF_CONF[@PREFIX@]
=
$PREFIX
NRF_CONF[@PID_DIRECTORY@]
=
'/var/run'
NRF_CONF[@NRF_INTERFACE_NAME_FOR_SBI@]
=
$NRF_INTERFACE_NAME_FOR_SBI
NRF_CONF[@NRF_INTERFACE_PORT_FOR_SBI@]
=
$NRF_INTERFACE_PORT_FOR_SBI
NRF_CONF[@NRF_INTERFACE_HTTP2_PORT_FOR_SBI@]
=
$NRF_INTERFACE_HTTP2_PORT_FOR_SBI
NRF_CONF[@NRF_API_VERSION@]
=
$NRF_API_VERSION
for
K
in
"
${
!NRF_CONF[@]
}
"
;
do
egrep
-lRZ
"
$K
"
$PREFIX
| xargs
-0
-l
sed
-i
-e
"s|
$K
|
${
NRF_CONF
[
$K
]
}
|g"
ret
=
$?
;
[[
ret
-ne
0
]]
&&
echo
"Tried to replace
$K
with
${
NRF_CONF
[
$K
]
}
"
done
cd
/openair-nrf/bin/
&&
./oai_nrf
-c
/usr/local/etc/oai/nrf.conf
-o
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment