first commit
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
Some checks failed
Vulhub Format Check and Lint / format-check (push) Has been cancelled
Vulhub Format Check and Lint / markdown-check (push) Has been cancelled
Vulhub Docker Image CI / longtime-images-test (push) Has been cancelled
Vulhub Docker Image CI / images-test (push) Has been cancelled
This commit is contained in:
26
base/uwsgi/php/2.0.16/Dockerfile
Normal file
26
base/uwsgi/php/2.0.16/Dockerfile
Normal file
@@ -0,0 +1,26 @@
|
||||
FROM debian:stretch
|
||||
|
||||
LABEL maintainer="phithon <root@leavesongs.com>"
|
||||
|
||||
RUN set -ex && \
|
||||
apt-get update && \
|
||||
apt-get install --no-install-recommends -y libphp7.0-embed ca-certificates wget build-essential python-dev php7.0-dev libonig-dev libqdbm-dev libz-dev libxml2-dev && \
|
||||
wget -qO- https://github.com/unbit/uwsgi/archive/2.0.16.tar.gz | tar xz -C /usr/src --strip-components=1 && \
|
||||
# ln -s /usr/lib/x86_64-linux-gnu/libz3.so /usr/lib/x86_64-linux-gnu/libz.so && \
|
||||
cd /usr/src && \
|
||||
make && \
|
||||
python uwsgiconfig.py --plugin plugins/php && \
|
||||
python uwsgiconfig.py --plugin plugins/http && \
|
||||
cp uwsgi php_plugin.so http_plugin.so / && \
|
||||
mkdir -p /var/www && \
|
||||
apt-get purge --autoremove -y build-essential ca-certificates wget && \
|
||||
rm -rf /usr/src /var/lib/apt/lists/* && \
|
||||
echo '<?=phpinfo()?>' > /var/www/index.php
|
||||
|
||||
COPY uwsgi.ini /etc/uwsgi.ini
|
||||
|
||||
WORKDIR /
|
||||
|
||||
EXPOSE 8080
|
||||
|
||||
CMD ["/uwsgi", "/etc/uwsgi.ini"]
|
41
base/uwsgi/php/2.0.16/uwsgi.ini
Normal file
41
base/uwsgi/php/2.0.16/uwsgi.ini
Normal file
@@ -0,0 +1,41 @@
|
||||
[uwsgi]
|
||||
; load the required plugins, php is loaded as the default (0) modifier
|
||||
plugins = http,0:php
|
||||
|
||||
; bind the http router to port 80
|
||||
http = :8080
|
||||
; leave the master running as root (to allows bind on port 80)
|
||||
master = true
|
||||
master-as-root = true
|
||||
|
||||
; drop privileges
|
||||
uid = nobody
|
||||
gid = nogroup
|
||||
|
||||
; our working dir
|
||||
project_dir = /var/www
|
||||
|
||||
; chdir to it (just for fun)
|
||||
chdir = %(project_dir)
|
||||
; check for static files in it
|
||||
check-static = %(project_dir)
|
||||
; ...but skip .php and .inc extensions
|
||||
static-skip-ext = .php
|
||||
static-skip-ext = .inc
|
||||
; search for index.html when a dir is requested
|
||||
static-index = index.html
|
||||
|
||||
; jail our php environment to project_dir
|
||||
php-docroot = %(project_dir)
|
||||
; and search for index.php and index.inc if required
|
||||
php-index = index.php
|
||||
php-index = index.inc
|
||||
; set php timezone
|
||||
php-set = date.timezone=Asia/Shanghai
|
||||
|
||||
; disable uWSGI request logging
|
||||
disable-logging = true
|
||||
; use a max of 10 processes
|
||||
processes = 4
|
||||
; ...but start with only 2 and spawn the others on demand
|
||||
cheaper = 2
|
17
base/uwsgi/python/2.0.17/Dockerfile
Normal file
17
base/uwsgi/python/2.0.17/Dockerfile
Normal file
@@ -0,0 +1,17 @@
|
||||
FROM buildpack-deps:stretch-curl
|
||||
|
||||
LABEL maintainer="phithon <root@leavesongs.com>"
|
||||
|
||||
ARG DEBIAN_MIRROR_URL=https://github.com/vulhub/mirrors/raw/master/debian/stretch/aliyun.list
|
||||
ARG PIP_MIRROR_URL=https://pypi.tuna.tsinghua.edu.cn/simple
|
||||
|
||||
RUN set -ex \
|
||||
&& wget $DEBIAN_MIRROR_URL -O /etc/apt/sources.list \
|
||||
&& apt-get update \
|
||||
&& apt-get install --no-install-recommends -y build-essential python3 python3-dev python3-pip \
|
||||
&& pip3 install -i $PIP_MIRROR_URL -U pip setuptools \
|
||||
&& pip install -i $PIP_MIRROR_URL "uwsgi==2.0.17" \
|
||||
&& apt-get purge --autoremove -y build-essential \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
WORKDIR /usr/src
|
Reference in New Issue
Block a user