forked from ampache/ampache-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
81 lines (73 loc) · 2.71 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
79
80
81
FROM composer:1.10.8 AS Builder
ADD https://github.com/ampache/ampache/archive/master.tar.gz /tmp
RUN tar -xzf /tmp/master.tar.gz --strip=1 -C . \
&& composer install --prefer-source --no-interaction \
&& rm -rf .git* .php_cs .sc .scrutinizer.yml .tgitconfig .travis.yml .tx *.md \
&& mv ./rest/.htac* ./rest/.htaccess \
&& mv ./play/.htac* ./play/.htaccess \
&& mv ./channel/.htac* ./channel/.htaccess \
&& chmod -R 775 .
FROM debian:stable
LABEL maintainer="lachlan-00"
ENV DEBIAN_FRONTEND=noninteractive
ENV MYSQL_PASS **Random**
RUN apt-get -q -q update \
&& apt-get -q -q -y install --no-install-recommends \
software-properties-common \
&& apt-add-repository contrib \
&& apt-add-repository non-free \
&& apt-get -q -q update \
&& apt-get -q -q -y install --no-install-recommends libdvd-pkg \
&& dpkg-reconfigure libdvd-pkg \
&& apt-get update \
&& apt-get -qq install --no-install-recommends \
apache2 \
cron \
ffmpeg \
flac \
gosu \
inotify-tools \
lame \
libavcodec-extra \
libev-libevent-dev \
libfaac-dev \
libmp3lame-dev \
libtheora-dev \
libvorbis-dev \
libvpx-dev \
mariadb-server \
php \
php-curl \
php-gd \
php-json \
php-mysql \
php-xml \
pwgen \
supervisor \
vorbis-tools \
zip \
&& rm -rf /var/lib/mysql/* /var/www/* /etc/apache2/sites-enabled/* /var/lib/apt/lists/* \
&& mkdir -p /var/run/mysqld \
&& chown -R mysql /var/run/mysqld \
&& ln -s /etc/apache2/sites-available/001-ampache.conf /etc/apache2/sites-enabled/ \
&& a2enmod rewrite \
&& rm -rf /var/cache/* /tmp/* /var/tmp/* /root/.cache /var/www/docs \
&& echo '30 7 * * * /usr/bin/php /var/www/bin/catalog_update.inc' | crontab -u www-data -
COPY --from=Builder --chown=www-data:www-data /app /var/www
RUN apt-get -qq purge \
libdvd-pkg \
lsb-release \
python3 \
python3-minimal \
software-properties-common \
&& apt-get -qq autoremove
VOLUME ["/etc/mysql", "/var/lib/mysql", "/media", "/var/www/config", "/var/www/themes"]
EXPOSE 80
COPY run.sh inotifywatch.sh cron.sh apache2.sh mysql.sh create_mysql_admin_user.sh /usr/local/bin/
COPY data/sites-enabled/001-ampache.conf /etc/apache2/sites-available/
COPY data/config/ampache.cfg.* /var/temp/
RUN chown www-data:www-data /var/temp/ampache.cfg.*
COPY docker-entrypoint.sh /usr/local/bin
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
ENTRYPOINT ["docker-entrypoint.sh"]
CMD ["run.sh"]