forked from pducharme/UniFi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
60 lines (46 loc) · 1.56 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
FROM phusion/baseimage:0.9.18
MAINTAINER [email protected]
# Set correct environment variables
ENV HOME /root
ENV DEBIAN_FRONTEND noninteractive
ENV LC_ALL C.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US.UTF-8
# Use baseimage-docker's init system
CMD ["/sbin/my_init"]
# Configure user nobody to match unRAID's settings
RUN \
usermod -u 99 nobody && \
usermod -g 100 nobody && \
usermod -d /home nobody && \
chown -R nobody:users /home
#Update APT-GET list
RUN \
apt-get update -q && \
apt-get upgrade -y && \
apt-get dist-upgrade -y
# Install Common Dependencies
RUN apt-get -y install curl software-properties-common
# Install Oracle Java 8
RUN echo oracle-java8-installer shared/accepted-oracle-license-v1-1 select true | /usr/bin/debconf-set-selections
RUN add-apt-repository ppa:webupd8team/java && apt-get update
RUN apt-get -y install oracle-java8-installer
RUN update-java-alternatives -s java-8-oracle
ENV JAVA_HOME /usr/lib/jvm/java-8-oracle
ENV JAVA8_HOME /usr/lib/jvm/java-8-oracle
# MongoDB
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv 7F0CEB10
ADD mongodb.list /etc/apt/sources.list.d/mongodb.list
RUN apt-get update && apt-get -y install mongodb-server
# UniFi 4.x
RUN apt-get -y install jsvc
RUN curl -L -o unifi_sysvinit_all.deb http://www.ubnt.com/downloads/unifi/4.8.12/unifi_sysvinit_all.deb
RUN dpkg --install unifi_sysvinit_all.deb
# Wipe out auto-generated data
RUN rm -rf /var/lib/unifi/*
EXPOSE 8080 8081 8443 8843 8880
VOLUME ["/var/lib/unifi"]
WORKDIR /var/lib/unifi
ADD run.sh /run.sh
RUN chmod 755 /run.sh
CMD ["/run.sh"]