.env
文件增加如下内容
LNMP_DOCKER_IMAGE_PREFIX=pcit-docker.pkg.coding.net/khs1994-docker/khs1994
LNMP_LIBRARY_NS=ccr.ccs.tencentyun.com/library-mirror
💻 🐳 🐘 🐬 🐧 🚀 Start LNMP In Less than 2 minutes Powered By Docker Compose, one command $ ./lnmp-docker up
Platform | Status |
---|---|
Windows | |
Linux | |
macOS | |
Linux arm64v8 |
LNMP Docker is supported on Linux, macOS, Windows 10 on x86_64
, and Debian (Raspberry Pi3) on arm
.
.env
Why ?
🎁 Donate
Welcome developer subscribe WeChat
To use LNMP Docker, you need:
1️⃣ Git
2️⃣ Docker 23.11 Stable +
4️⃣ WSL (Windows Only)
Please see Windows 10.
Use git install LNMP Docker.
$ git clone --depth=1 https://github.com/khs1994-docker/lnmp.git
# $ git clone --depth=1 [email protected]:khs1994-docker/lnmp.git
# 中国镜像
$ git clone --depth=1 https://gitee.com/khs1994-docker/lnmp.git
# $ git clone --depth=1 [email protected]:khs1994-docker/lnmp.git
$ cd lnmp
$ ./lnmp-docker up
$ curl 127.0.0.1
Welcome use khs1994-docker/lnmp v23.11 x86_64 With Pull Docker Image
development
💡 MySQL default root password mytest
Create new folder to start PHP project(e.g, Laravel) in ./app/
folder, And edit nginx config file in ./config/nginx/yourfilename.conf
.
# $ ./lnmp-docker new
$ ./lnmp-docker restart nginx
You can set
APP_ROOT
to change PHP project folder.
More information please see Docker PHP Best Practice https://github.com/khs1994-docker/php-demo
$redis = new \Redis();
- $redis->connect('127.0.0.1',6379);
+ $redis->connect('redis', 6379);
- $pdo = new \PDO('mysql:host=127.0.0.1;dbname=test;port=3306','root','mytest');
+ $pdo = new \PDO('mysql:host=mysql,dbname=test,port=3306', 'root', 'mytest');
-
lnmp-php
-
lnmp-composer
-
lnmp-phpunit
-
lnmp-laravel
-
...
For more information please see Documents
Powered by
acme.sh
$ ./lnmp-docker ssl khs1994.com -d *.khs1994.com
Please set API key and id in
.env
file or System ENV. Support Self-Signed SSL certificate, for more information, see Documents.
$ docker container ls -a -f label=com.khs1994.lnmp
Edit Dockerfile
in ./dockerfile/*/Dockerfile
, then exec ./lnmp-docker build
.
# Restart all container
$ ./lnmp-docker restart
$ ./lnmp-docker restart nginx php8
$ ./lnmp-docker stop
$ ./lnmp-docker down
Please see Documents.
Name | Docker Image | Version | Based |
---|---|---|---|
ACME.sh | khs1994/acme:3.1.0 |
3.1.0 | alpine:3.20 |
NGINX | nginx:1.27.0-alpine |
1.27.0 | alpine:3.19 |
NGINX Unit | khs1994/php:8.3.12-unit-alpine |
1.33.0 | alpine:3.20 |
HTTPD | httpd:2.4.53-alpine |
2.4.53 | alpine:3.16 |
MySQL | mysql:8.0.33 |
8.0.33 | oraclelinux:8-slim |
MariaDB | mariadb:10.11.5 |
10.11.5 | ubuntu:jammy |
Redis | redis:7.0.0-alpine |
7.0.0 | alpine:3.16 |
PHP-FPM | khs1994/php:8.3.12-fpm-alpine |
8.3.12 | alpine:3.20 |
Composer | khs1994/php:8.3.12-composer-alpine |
2.5.8 | alpine:3.20 |
Memcached | memcached:1.6.15-alpine |
1.6.15 | alpine:3.16 |
RabbitMQ | rabbitmq:3.9.0-management-alpine |
3.9.0 | alpine:3.13 |
PostgreSQL | postgres:14.0-alpine |
14.0 | alpine:3.14 |
MongoDB | mongo:5.0.3 |
5.0.3 | ubuntu:bionic |
PHPMyAdmin | phpmyadmin:5.2.0 |
5.2.0 | alpine:3.16 |
Registry | registry:latest |
latest | alpine:3.11 |
Folder | description |
---|---|
app |
PHP project (HTML, PHP, etc) |
scripts/backup |
backup database file |
bin |
PHPer Commands |
config |
configuration file |
dockerfile |
Dockerfile |
log |
log file |
scripts |
bash shell script |
- 80
- 443
Easy to generate nginx or apache config, etc. Please use ./lnmp-docker
.
Please see #895
Please see khs1994-docker/ci
Please see Contributing
- docker_practice
- Compose file version 3 reference
- Share Compose configurations between files and projects
- kasperisager/php-dockerized
- zhaojunlike/docker-lnmp-redis
- micooz/docker-lnmp
- twang2218/docker-lnmp
- bravist/lnmp-docker
- yeszao/dnmp
- laradock/laradock
Please see https://zan.khs1994.com