aboutsummaryrefslogtreecommitdiffstats
path: root/osmo-ran/split/ran-trx-ipc/Dockerfile
diff options
context:
space:
mode:
Diffstat (limited to 'osmo-ran/split/ran-trx-ipc/Dockerfile')
-rw-r--r--osmo-ran/split/ran-trx-ipc/Dockerfile76
1 files changed, 76 insertions, 0 deletions
diff --git a/osmo-ran/split/ran-trx-ipc/Dockerfile b/osmo-ran/split/ran-trx-ipc/Dockerfile
new file mode 100644
index 0000000..c5ce057
--- /dev/null
+++ b/osmo-ran/split/ran-trx-ipc/Dockerfile
@@ -0,0 +1,76 @@
+ARG USER
+FROM $USER/systemd
+# Arguments used after FROM must be specified again
+ARG DISTRO
+ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
+ARG OSMOCOM_REPO_VERSION=latest
+
+MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
+
+ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
+ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8/"
+
+COPY Release.key /tmp/Release.key
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ gnupg && \
+ apt-key add /tmp/Release.key && \
+ rm /tmp/Release.key && \
+ echo "deb " $OSMOCOM_REPO_DEBIAN " ./" > /etc/apt/sources.list.d/osmocom-$OSMOCOM_REPO_VERSION.list \
+ ;; \
+ centos*) \
+ echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf && \
+ dnf install -y dnf-utils wget && \
+ yum config-manager --set-enabled PowerTools && \
+ cd /etc/yum.repos.d/ && \
+ wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
+ ;; \
+ esac
+
+# we need to add this to invalidate the cache once the repository is updated.
+# unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM
+ADD $OSMOCOM_REPO_DEBIAN/Release /tmp/Release
+ADD $OSMOCOM_REPO_CENTOS/repodata/repomd.xml /tmp/repomd.xml
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ less \
+ apt-utils \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-trx-ipc && \
+ apt-get clean \
+ ;; \
+ centos*) \
+ dnf install -y \
+ less \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-trx-ipc \
+ ;; \
+ esac
+
+RUN systemctl enable osmo-trx-ipc
+
+WORKDIR /tmp
+RUN cp -r /etc/osmocom /etc/osmocom-default
+VOLUME /data
+VOLUME /etc/osmocom
+VOLUME /tmp/ud
+
+COPY osmocom/* /etc/osmocom/
+
+CMD ["/lib/systemd/systemd", "--system", "--unit=multi-user.target"]
+
+#osmo-trx-ipc: VTY CTRL
+EXPOSE 4237 4236
+EXPOSE 5700 5701 5702