forked from pducharme/UniFi-Video-Controller
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
36 lines (30 loc) · 1.06 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
FROM phusion/baseimage:latest
MAINTAINER pducharme@me.com
# 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
ENV JVM_MAX_THREAD_STACK_SIZE=1280k #for CVE-2017-1000364
# Add needed patches and scripts
ADD unifi-video.patch /unifi-video.patch
ADD run.sh /run.sh
# Run all commands
RUN apt-get update && \
apt-get install -y apt-utils && \
apt-get upgrade -y -o Dpkg::Options::="--force-confold" && \
apt-get install -y wget sudo moreutils patch && \
apt-get install -y mongodb-server openjdk-8-jre-headless jsvc && \
wget -q https://dl.ubnt.com/firmwares/unifi-video/3.7.3/unifi-video_3.7.3-Ubuntu16.04_amd64.deb && \
dpkg -i unifi-video_3.7.3-Ubuntu16.04_amd64.deb && \
patch -N /usr/sbin/unifi-video /unifi-video.patch && \
rm /unifi-video_3.7.3-Ubuntu16.04_amd64.deb && \
rm /unifi-video.patch && \
chmod 755 /run.sh
# Volumes
VOLUME /var/lib/unifi-video /var/log/unifi-video
# Ports
EXPOSE 7443 7445 7446 7447 7080 6666
# Run this potato
CMD ["/run.sh"]