ContainerImage.LighttpdPHPP.../Dockerfile

45 lines
1.5 KiB
Docker
Raw Normal View History

2019-11-26 15:14:51 +00:00
FROM mcr.microsoft.com/powershell:ubuntu-bionic
2019-11-26 14:55:49 +00:00
2019-11-27 09:37:48 +00:00
ARG DEBIAN_FRONTEND=noninteractive
2020-06-05 11:17:39 +00:00
ARG PHP_VERSION=7.4
2019-11-27 09:37:48 +00:00
2019-11-26 14:55:49 +00:00
COPY init/entrypoint.sh /usr/local/bin
RUN chmod +x /usr/local/bin/entrypoint.sh && \
2019-11-26 15:43:09 +00:00
apt-get update && \
2019-11-27 09:37:48 +00:00
apt-get install -y --no-install-recommends \
2019-11-27 09:28:46 +00:00
libterm-readline-gnu-perl \
2019-11-26 15:43:09 +00:00
software-properties-common && \
add-apt-repository ppa:ondrej/php && \
2019-11-27 09:37:48 +00:00
apt-get install -y --no-install-recommends \
2019-11-26 14:55:49 +00:00
lighttpd \
2020-06-05 10:58:53 +00:00
php$PHP_VERSION-cgi \
php$PHP_VERSION-common \
php$PHP_VERSION-curl \
php$PHP_VERSION-gd \
php$PHP_VERSION-json \
php$PHP_VERSION-ldap \
php$PHP_VERSION-pdo \
php$PHP_VERSION-sqlite3 \
# php$PHP_VERSION-session \
php$PHP_VERSION-xmlrpc && \
2019-11-26 14:55:49 +00:00
# Enable PHP
2019-11-27 09:28:46 +00:00
lighttpd-enable-mod fastcgi-php && \
2019-11-26 14:55:49 +00:00
# Include vhost's
2020-06-05 10:11:25 +00:00
sed -i -e '$a\' -e 'include_shell "cat /etc/lighttpd/vhosts.d/*.conf"' /etc/lighttpd/lighttpd.conf && \
# Enable browscap
2020-06-05 11:17:39 +00:00
sed -i -e 's|;browscap.*|browscap = /usr/lib/php/browscap.ini|' /etc/php/$PHP_VERSION/cgi/php.ini && \
curl -Ls https://browscap.org/stream?q=Lite_PHP_BrowsCapINI -o /usr/lib/php/browscap.ini && \
2019-11-27 09:43:44 +00:00
mkdir -p /run/lighttpd/ && chown www-data /run/lighttpd/ && \
2019-11-27 09:28:46 +00:00
apt-get remove -y \
libterm-readline-gnu-perl \
software-properties-common && \
2019-11-27 09:37:48 +00:00
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/*
2019-11-26 14:55:49 +00:00
2019-11-27 13:02:36 +00:00
VOLUME /data/scripts
2019-11-26 14:55:49 +00:00
VOLUME /etc/lighttpd/vhosts.d
VOLUME /var/www
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"]