This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
78 lines (41 loc) · 1.51 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y \
autoconf automake pkgconf libtool libjpeg8-dev build-essential libzip-dev gettext libmicrohttpd-dev \
libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev git tzdata nginx supervisor \
logrotate apache2-utils openssl autopoint
ENV TZ Australia/Perth
RUN dpkg-reconfigure -f noninteractive tzdata
COPY motion /srv/motion
WORKDIR /srv/motion
RUN autoreconf -fiv
RUN ./configure --prefix=/
RUN make
RUN make install
RUN mkdir -p /srv/target_dir
RUN cp -frv /etc/motion /srv/default_etc_motion
RUN groupadd syslog
RUN useradd nginx
ENV WEB_USERNAME cctv
ENV WEB_PASSWORD cctv123!@#
RUN htpasswd -c -b /srv/nginx.htpasswd ${WEB_USERNAME} ${WEB_PASSWORD}
RUN mkdir /srv/root
COPY res/config.py /srv/config.py
COPY res/event_parser.py /srv/event_parser.py
COPY res/event_parser_loop.py /srv/event_parser_loop.py
COPY res/motion-cctv.conf /etc/supervisor/conf.d/motion-cctv.conf
COPY res/nginx.conf /etc/nginx/nginx.conf
COPY res/index.html /srv/root/index.html
COPY res/nginx-selfsigned.key /etc/ssl/private/nginx-selfsigned.key
COPY res/nginx-selfsigned.crt /etc/ssl/certs/nginx-selfsigned.crt
VOLUME /etc/motion
VOLUME /srv/target_dir
#VOLUME /etc/ssl/private/nginx-selfsigned.key
#VOLUME /etc/ssl/private/nginx-selfsigned.crt
EXPOSE 80
EXPOSE 443
EXPOSE 8080
EXPOSE 8081
ENV TARGET_DIR /srv/target_dir
ENV OUTPUT_PATH /srv/root/
ENV BROWSE_URL_PREFIX /browse/
CMD supervisord -n -c /etc/supervisor/supervisord.conf