Osmocom docker containers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
docker-playground/osmo-gbproxy-latest/Dockerfile

64 lines
1.6 KiB

ARG REGISTRY=docker.io
ARG UPSTREAM_DISTRO=debian:stretch
FROM ${REGISTRY}/${UPSTREAM_DISTRO}
# Arguments used after FROM must be specified again
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
ARG DISTRO
MAINTAINER Harald Welte <laforge@gnumonks.org>
ARG OSMOCOM_REPO="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/Debian_9.0/"
COPY Release.key /tmp/Release.key
RUN apt-get update && \
apt-get install -y --no-install-recommends \
gnupg
RUN case "$DISTRO" in \
debian*) \
apt-key add /tmp/Release.key && \
rm /tmp/Release.key && \
echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-latest.list \
;; \
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/Release /tmp/Release
ADD $OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/latest/CentOS_8/repodata/repomd.xml /tmp/repomd.xml
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
apt-get install -y --no-install-recommends \
osmo-gbproxy \
telnet \
&& \
apt-get clean \
;; \
centos*) \
dnf install -y \
osmo-gbproxy \
telnet \
;; \
*) \
echo "Unsupported distribution $DISTRO" \
exit 23 \
;; \
esac
WORKDIR /data
VOLUME /data
COPY osmo-gbproxy.cfg /data/osmo-gbproxy.cfg
# work-around for stupid docker not being able to properly deal with host netdevices or start
# containers in pre-existing netns
COPY pipework /usr/bin/pipework
COPY docker-entrypoint.sh /docker-entrypoint.sh
CMD ["/docker-entrypoint.sh"]
EXPOSE 23000/udp 4246/tcp 4263/tcp