-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
28 lines (19 loc) · 927 Bytes
/
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
FROM debian:stretch
ENV MEDIADIR=/avreg_media
ENV DBDIR=/avreg_db
RUN mkdir $MEDIADIR && ln -s $MEDIADIR /var/spool/avreg
VOLUME /avreg_db /avreg_media
# add avreg repository to application sources
RUN echo "deb http://avreg.net/repos/6.3-html5/debian/ stretch main contrib non-free" >> /etc/apt/sources.list
# remove policy file to allow start services while apt-get install
RUN rm -rf /usr/sbin/policy-rc.d
# prepare answers to install mysql
RUN echo "mysql-server-5.8 mysql-server/root_password password 12345" | debconf-set-selections
RUN echo "mysql-server-5.8 mysql-server/root_password_again password 12345" | debconf-set-selections
RUN DEBIAN_FRONTEND=noninteractive \
apt-get update && apt-get install -y --force-yes avreg-server-mysql \
&& service avreg stop
# entry point will start mysql, apache2, and avreg services and stop them as well on demand
ADD entry_point.sh /
CMD ["/entry_point.sh"]
EXPOSE 80