Public Repository

Last pushed: 8 months ago
Short Description
Open LiteSpeed Web Server
Full Description

Dockerfile

FROM ubuntu:16.04

ENV VERSION "1.4.27"

LABEL com.version.release = $VERSION

EXPOSE 7080 8088

COPY httpd_config.conf /root/

RUN apt-get update \
&& apt-get install -y wget \
&& wget -O - http://rpms.litespeedtech.com/debian/enable_lst_debain_repo.sh | bash \
&& apt-get install -y \
openlitespeed=$VERSION-2+xenial \
lsphp56 \
lsphp56-curl \
lsphp56-enchant \
lsphp56-gd \
lsphp56-gmp \
lsphp56-imap \
lsphp56-intl \
lsphp56-ldap \
lsphp56-mcrypt \
lsphp56-mysql \
lsphp56-odbc \
lsphp56-pgsql \
lsphp56-pspell \
lsphp56-recode \
lsphp56-snmp \
lsphp56-sqlite \
lsphp56-tidy \
lsphp56-xmlrpc \
lsphp56-xsl \
lsphp70 \
lsphp70-common \
lsphp70-curl \
lsphp70-imap \
lsphp70-intl \
lsphp70-json \
lsphp70-ldap \
lsphp70-mysql \
lsphp70-opcache \
lsphp70-pgsql \
lsphp70-pspell \
lsphp70-recode \
lsphp70-snmp \
lsphp70-sqlite3 \
lsphp70-sybase \
lsphp70-tidy \
lsphp71 \
lsphp71-common \
lsphp71-curl \
lsphp71-imap \
lsphp71-intl \
lsphp71-json \
lsphp71-ldap \
lsphp71-mysql \
lsphp71-opcache \
lsphp71-pgsql \
lsphp71-pspell \
lsphp71-recode \
lsphp71-snmp \
lsphp71-sqlite3 \
lsphp71-sybase \
lsphp71-tidy \
geoip-database-extra \
&& ln -sf /usr/local/lsws/lsphp56/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp56 \
&& ln -sf /usr/local/lsws/lsphp70/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp70 \
&& ln -sf /usr/local/lsws/lsphp71/bin/lsphp /usr/local/lsws/fcgi-bin/lsphp71 \
&& mkdir /usr/local/lsws/vhosts/ \
&& mv /usr/local/lsws/Example/ /usr/local/lsws/vhosts/ \
&& sed -i 's/^admin\:.$/admin\:\$1\$f\/bpzLQS\$q3ejtPwzx56Wqb9hKnbyj0/' /usr/local/lsws/admin/conf/htpasswd \
&& sed -i -E 's/^\s
vhRoot\s+\$SERVER_ROOT\/Example\/?\s*$/ vhRoot \$SERVER_ROOT\/vhosts\/Example\//' /usr/local/lsws/conf/httpd_config.conf \
&& cat /root/httpd_config.conf >> /usr/local/lsws/conf/httpd_config.conf \
&& rm /root/httpd_config.conf

VOLUME ["/usr/local/lsws/conf","/usr/local/lsws/logs","/usr/local/lsws/admin/conf","/usr/local/lsws/admin/logs","/usr/local/lsws/vhosts"]

COPY entrypoint.sh /
CMD ["/entrypoint.sh"]

httpd_config.conf

extProcessor lsphp56{
type lsapi
address uds://tmp/lshttpd/lsphp56.sock
maxConns 35
env PHP_LSAPI_MAX_REQUESTS=500
env PHP_LSAPI_CHILDREN=35
initTimeout 60
retryTimeout 0
persistConn 1
pcKeepAliveTimeout
respBuffer 0
autoStart 1
path $SERVER_ROOT/fcgi-bin/lsphp56
backlog 100
instances 1
priority 0
memSoftLimit 2047M
memHardLimit 2047M
procSoftLimit 400
procHardLimit 500
}

extProcessor lsphp70{
type lsapi
address uds://tmp/lshttpd/lsphp70.sock
maxConns 35
env PHP_LSAPI_MAX_REQUESTS=500
env PHP_LSAPI_CHILDREN=35
initTimeout 60
retryTimeout 0
persistConn 1
pcKeepAliveTimeout
respBuffer 0
autoStart 1
path $SERVER_ROOT/fcgi-bin/lsphp70
backlog 100
instances 1
priority 0
memSoftLimit 2047M
memHardLimit 2047M
procSoftLimit 400
procHardLimit 500
}

extProcessor lsphp71{
type lsapi
address uds://tmp/lshttpd/lsphp71.sock
maxConns 35
env PHP_LSAPI_MAX_REQUESTS=500
env PHP_LSAPI_CHILDREN=35
initTimeout 60
retryTimeout 0
persistConn 1
pcKeepAliveTimeout
respBuffer 0
autoStart 1
path $SERVER_ROOT/fcgi-bin/lsphp71
backlog 100
instances 1
priority 0
memSoftLimit 2047M
memHardLimit 2047M
procSoftLimit 400
procHardLimit 500
}

scriptHandler{
add lsapi:lsphp56 php
add lsapi:lsphp70 php
add lsapi:lsphp71 php
}

geoipdb /usr/share/GeoIP/GeoIPCity.dat {
geoipDBCache MemoryCache
}

Docker Pull Command
Owner
farfui