forked from leejoneshane/docker-youphptube
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
50 lines (46 loc) · 1.73 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
FROM alpine:3.8
ENV DOMAIN your.domain
ENV DOMAIN_PROTOCOL http
ENV SITE_TITLE your_site_title
ENV ADMIN_PASSWORD password
ENV ADMIN_EMAIL webmaster@your.domain
ENV DB_HOST localhost
ENV DB_USER root
ENV DB_PASSWORD password
ENV SALT your.salt
ENV LANG en
ADD configuration.php /root/
ADD entrypoint.sh /usr/local/bin/
ADD gencerts.sh /usr/local/bin/
WORKDIR /var/www/localhost/htdocs
RUN apk update \
&& apk add --no-cache git curl certbot acme-client openssl mysql-client apache2 apache2-ssl php7 php7-apache2 php7-mysqlnd php7-mysqli php7-json php7-session php7-curl php7-gd php7-intl php7-exif php7-mbstring php7-gettext php7-ctype ffmpeg exiftool perl-image-exiftool python youtube-dl \
&& rm -rf /var/cache/apk/* \
&& mkdir /run/apache2 \
&& sed -ri \
-e 's!^(\s*CustomLog)\s+\S+!\1 /proc/self/fd/1!g' \
-e 's!^(\s*ErrorLog)\s+\S+!\1 /proc/self/fd/2!g' \
-e 's!^#(LoadModule rewrite_module .*)$!\1!g' \
-e 's!^(\s*AllowOverride) None.*$!\1 All!g' \
"/etc/apache2/httpd.conf" \
\
&& sed -ri \
-e 's!^(max_execution_time = )(.*)$!\1 72000!g' \
-e 's!^(post_max_size = )(.*)$!\1 10G!g' \
-e 's!^(upload_max_filesize = )(.*)$!\1 10G!g' \
-e 's!^(memory_limit = )(.*)$!\1 10G!g' \
"/etc/php7/php.ini" \
\
&& rm -f index.html \
&& git clone https://github.com/WWBN/AVideo.git \
&& mv AVideo/* . \
&& mv AVideo/.[!.]* . \
&& rm -rf AVideo \
&& chmod a+rx /usr/local/bin/entrypoint.sh \
&& chmod a+rx /usr/local/bin/gencerts.sh \
&& mkdir videos \
&& chmod 755 videos \
&& chown -R apache:apache /var/www
VOLUME ["/var/www/localhost/htdocs/videos"]
EXPOSE 80 443
CMD ["entrypoint.sh"]