$ docker pull \
gitmaspaad/debian-php:1.5
or
FROM gitmaspaad/debian-php:1.5
Save Dockerfile to C:\Users\username\docker-src\debian-php
Locate to directory
$ cd %USERPROFILE%\docker-src\debian-php
Format : docker build --no-cache -t example_different_name:tag_number .
$ docker build --no-cache -t \
gitmaspaad/debian-php:1.5 .
All right, the last step.
$ docker run -it \
--name=ctr-debian-php-1.5 \
--privileged \
--dns 8.8.8.8 \
--dns 8.8.4.4 \
--add-host=host.docker.internal:host-gateway \
-p 9056:9056/tcp \
-p 9070-9074:9070-9074/tcp \
-p 9080-9085:9080-9085/tcp \
-v C:\Wnmp\nginx\www:/var/www \
-d gitmaspaad/debian-php:1.5 \
/lib/systemd/systemd
After container runs. Login into container.
$ docker exec \
-u 0 \
-it ctr-debian-php-1.5 \
bash
Turn on (manually) php services inside the container.
$ systemctl start \
php-p9056-v5.6.service \
php-p9070-v7.0.service \
php-p9071-v7.1.service \
php-p9072-v7.2.service \
php-p9073-v7.3.service \
php-p9074-v7.4.service \
php-p9080-v8.0.service \
php-p9081-v8.1.service \
php-p9082-v8.2.service \
php-p9083-v8.3.service \
php-p9084-v8.4.service \
php-p9085-v8.5.service
Turn on (manually) PostgreSQL port 5101 (on Windows) because We would like to make it appear (as local port 5101) inside the container.
$ systemctl start proxy-host-ports.service
https://git-maspaad.blogspot.com/2026/07/tutorial-multiple-postgresql.html
FYI. I'm doing development by using Wnmp on Windows 11. So, it's by default use Nginx as web server. Here is the Nginx configuration.
# ==========================================
# Main Server Block for PHP Application
# ==========================================
server {
listen 6031 default_server;
listen [::]:6031 default_server;
server_name _ localhost 127.0.0.1;
index index.php index.html;
root c:/wnmp/nginx/www;
proxy_hide_header Access-Control-Allow-Origin;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Methods' 'GET, POST, PUT, DELETE, OPTIONS';
add_header 'Access-Control-Allow-Headers' 'DNT,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Range' always;
add_header 'Access-Control-Expose-Headers' 'Content-Length,Content-Range' always;
## If no favicon exists return a 204 (no content error).
location = /favicon.ico {
try_files $uri =204;
log_not_found off;
access_log off;
}
## Don't log robots.txt requests.
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
## Try the requested URI as files before handling it to PHP.
location /php56
{
# rewrite /(.*)$ /$1 break;
# try_files $uri $uri/ /index.html;
try_files $uri $uri/ /php56/index.php$args;
# kill cache
sendfile off;
add_header Last-Modified $date_gmt;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;
proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_http_version 1.1;
# proxy_pass http://localhost:7000/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10M;
## Regular PHP processing.
# location ~ ^/php56/(.+\.php)$
location ~ \.php$
{
try_files $uri =404;
fastcgi_pass 127.0.0.1:9056;
# fastcgi_pass php_processes;
fastcgi_index index.php;
# use this if your php inside docker container, but the doc root inside windows. Example C:\Wnmp\nginx\www
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
# fastcgi_param SCRIPT_FILENAME /var/www/php56$fastcgi_script_name;
# use this if your php and doc root in the same environment / the same os
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
## Static files
location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ {
expires max;
log_not_found off;
## No need to bleed constant updates. Send the all shebang in one
## fell swoop.
tcp_nodelay off;
## Set the OS file cache.
open_file_cache max=1000 inactive=120s;
open_file_cache_valid 45s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
}
## Keep a tab on the 'big' static files.
location ~* ^.+\.(?:ogg|pdf|pptx?)$ {
expires 30d;
## No need to bleed constant updates. Send the all shebang in one
## fell swoop.
tcp_nodelay off;
}
} # / location
## Try the requested URI as files before handling it to PHP.
location /php70
{
# rewrite /(.*)$ /$1 break;
# try_files $uri $uri/ /index.html;
try_files $uri $uri/ /index.php$args;
# try_files $uri $uri/ /php70/index.php$args;
# kill cache
sendfile off;
add_header Last-Modified $date_gmt;
add_header 'Cache-Control' 'no-store, no-cache, must-revalidate, proxy-revalidate, max-age=0';
if_modified_since off;
expires off;
etag off;
proxy_no_cache 1;
proxy_cache_bypass 1;
proxy_http_version 1.1;
# proxy_pass http://localhost:7000/;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
client_max_body_size 10M;
## Regular PHP processing.
# location ~ ^/php56/(.+\.php)$
location ~ \.php$
{
try_files $uri =404;
fastcgi_pass 127.0.0.1:9070;
# fastcgi_pass php_processes;
fastcgi_index index.php;
# use this if your php inside docker container, but the doc root inside windows. Example C:\Wnmp\nginx\www
fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name;
# fastcgi_param SCRIPT_FILENAME /var/www/php70$fastcgi_script_name;
# use this if your php and doc root in the same environment / the same os
# fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
## Static files
location ~* \.(?:css|gif|htc|ico|js|jpe?g|png|swf)$ {
expires max;
log_not_found off;
## No need to bleed constant updates. Send the all shebang in one
## fell swoop.
tcp_nodelay off;
## Set the OS file cache.
open_file_cache max=1000 inactive=120s;
open_file_cache_valid 45s;
open_file_cache_min_uses 2;
open_file_cache_errors off;
}
## Keep a tab on the 'big' static files.
location ~* ^.+\.(?:ogg|pdf|pptx?)$ {
expires 30d;
## No need to bleed constant updates. Send the all shebang in one
## fell swoop.
tcp_nodelay off;
}
} # / location
}
https://sourceforge.net/projects/wnmp-env/files/wnmp/
Content type
Image
Digest
sha256:ff9f1b9b4…
Size
12.7 GB
Last updated
22 days ago
docker pull gitmaspaad/debian-php:1.5