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

This commit is contained in:
2025-09-06 16:08:15 +08:00
commit 63285f61aa
2624 changed files with 88491 additions and 0 deletions

View 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"]

View 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