From 27cd1d0e360e3b733cce66fb6afcd73b9529a397 Mon Sep 17 00:00:00 2001 From: Jess Frazelle Date: Thu, 30 Nov 2017 10:50:46 -0500 Subject: [PATCH] add unifi Signed-off-by: Jess Frazelle --- unifi/Dockerfile | 50 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 unifi/Dockerfile diff --git a/unifi/Dockerfile b/unifi/Dockerfile new file mode 100644 index 0000000..59259ff --- /dev/null +++ b/unifi/Dockerfile @@ -0,0 +1,50 @@ +FROM ubuntu:16.04 + +# environment settings +ENV DEBIAN_FRONTEND="noninteractive" + +# install deps +RUN apt-get update && apt-get install -y \ + ca-certificates \ + dirmngr \ + gnupg \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +# add mongo repo +RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 0C49F3730359A14518585931BC711F9BA15703C6 \ + && echo "deb [ arch=amd64,arm64 ] http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.4 multiverse" >> /etc/apt/sources.list.d/mongo.list + + +# install packages +RUN apt-get update && apt-get install -y \ + binutils \ + jsvc \ + mongodb-org-server \ + openjdk-8-jre-headless \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* + +# unifi version +# From: https://www.ubnt.com/download/unifi/ +ENV UNIFI_VERSION "5.6.22" + +# install unifi +RUN buildDeps=' \ + curl \ + ' \ + set -x \ + && apt-get update && apt-get install -y \ + $buildDeps \ + --no-install-recommends \ + && rm -rf /var/lib/apt/lists/* \ + && curl -o /tmp/unifi.deb -L "http://dl.ubnt.com/unifi/${UNIFI_VERSION}/unifi_sysvinit_all.deb" \ + && dpkg -i /tmp/unifi.deb \ + && rm -rf /tmp/unifi.deb \ + && apt-get purge -y $buildDeps \ + && echo "Build complete." + +WORKDIR /config +EXPOSE 8080 8081 8443 8843 8880 + +CMD ["java", "-Xmx1024M", "-jar", "/usr/lib/unifi/lib/ace.jar", "start"]