46 lines
1.6 KiB
Docker
46 lines
1.6 KiB
Docker
FROM mcr.microsoft.com/powershell:ubuntu-bionic
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
ARG PHP_VERSION=7.3
|
|
|
|
COPY init/entrypoint.sh /usr/local/bin
|
|
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh && \
|
|
apt-get update && \
|
|
apt-get install -y --no-install-recommends \
|
|
libterm-readline-gnu-perl \
|
|
software-properties-common && \
|
|
add-apt-repository ppa:ondrej/php && \
|
|
apt-get install -y --no-install-recommends \
|
|
lighttpd \
|
|
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 && \
|
|
# Enable PHP
|
|
lighttpd-enable-mod fastcgi-php && \
|
|
# Include vhost's
|
|
sed -i -e '$a\' -e 'include_shell "cat /etc/lighttpd/vhosts.d/*.conf"' /etc/lighttpd/lighttpd.conf && \
|
|
# Enable browscap
|
|
sed -i -e 's/;browscap /browscap /' /etc/php/$PHP_VERSION/cgi/php.ini && \
|
|
mkdir /etc/php/$PHP_VERSION/cgi/extra &&
|
|
curl -Ls https://browscap.org/stream?q=Lite_PHP_BrowsCapINI -o /etc/php/$PHP_VERSION/cgi/extra/browscap.ini && \
|
|
mkdir -p /run/lighttpd/ && chown www-data /run/lighttpd/ && \
|
|
apt-get remove -y \
|
|
libterm-readline-gnu-perl \
|
|
software-properties-common && \
|
|
apt-get autoremove -y && \
|
|
rm -rf /var/lib/apt/lists/*
|
|
|
|
VOLUME /data/scripts
|
|
VOLUME /etc/lighttpd/vhosts.d
|
|
VOLUME /var/www
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]
|
|
CMD ["lighttpd", "-D", "-f", "/etc/lighttpd/lighttpd.conf"] |