2020-06-12 11:22:23 +00:00
|
|
|
FROM mcr.microsoft.com/powershell:ubuntu-bionic
|
|
|
|
|
|
|
|
ARG DEBIAN_FRONTEND=noninteractive
|
|
|
|
ARG PHP_VERSION=7.4
|
|
|
|
|
|
|
|
COPY init/entrypoint.sh /usr/local/bin
|
|
|
|
|
|
|
|
RUN chmod +x /usr/local/bin/entrypoint.sh && \
|
|
|
|
apt-get update && \
|
2020-09-24 12:52:09 +00:00
|
|
|
apt-get upgrade -y && \
|
2020-06-12 11:22:23 +00:00
|
|
|
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-mbstring \
|
|
|
|
php$PHP_VERSION-pdo \
|
|
|
|
php$PHP_VERSION-sqlite3 \
|
|
|
|
# php$PHP_VERSION-session \
|
|
|
|
php$PHP_VERSION-xml \
|
|
|
|
php$PHP_VERSION-xmlrpc \
|
|
|
|
php$PHP_VERSION-zip && \
|
|
|
|
# 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 = /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 && \
|
|
|
|
# Set timezone
|
|
|
|
sed -i -e 's|;date.timezone.*|date.timezone = Europe/Amsterdam|' /etc/php/$PHP_VERSION/cgi/php.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 && \
|
2020-09-30 07:02:51 +00:00
|
|
|
rm -rf /var/lib/apt/lists/* && \
|
|
|
|
pwsh -Command "Set-PSRepository -Name 'PSGallery' -InstallationPolicy 'Trusted' -Verbose" && \
|
2021-11-07 10:53:57 +00:00
|
|
|
pwsh -Command "Find-Module -Name 'ExchangeOnlineManagement' -Repository 'PSGallery' -MinimumVersion 2.0.4-Preview2 -AllowPrerelease | Save-Module -Path '/opt/microsoft/powershell/7/Modules'" && \
|
2021-11-07 11:02:09 +00:00
|
|
|
pwsh -Command "Find-Module -Name 'PSWSMan' -Repository 'PSGallery' -AllowPrerelease | Save-Module -Path '/opt/microsoft/powershell/7/Modules'"
|
2021-11-07 10:53:57 +00:00
|
|
|
|
2020-06-12 11:22:23 +00:00
|
|
|
|
|
|
|
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"]
|