Start LNMP In Less than 2 minutes Powered By Docker Compose.
More Than LNMP Docker,Support ALL Arch、ALL Environment.
LNMP Docker is supported on Linux, macOS, Windows 10 on x86_64
, and Debian (Raspberry Pi3) on arm
.
Warning Don't Edit Any Files except .env
, Why ?
Please see https://github.com/khs1994-docker/lnmp-k8s
Please see https://github.com/khs1994-docker/lnmp/issues/354
Please see khs1994-docker#450
To use LNMP Docker, you need:
-
Docker CE 18.03 Stable +
-
Docker Compose 1.20.1+
-
WSL (Windows Only)
Please see Windows 10.
Please see https://github.com/khs1994-docker/lnmp/tree/master/wsl
Pick one method install LNMP Docker.
-
Using
git clone
$ git clone --recursive https://github.com/khs1994-docker/lnmp.git # $ git clone --recursive git@github.com:khs1994-docker/lnmp.git # **镜像 $ git clone --recursive https://code.aliyun.com/khs1994-docker/lnmp.git # $ git clone --recursive git@code.aliyun.com:khs1994-docker/lnmp.git
-
Using Composer create project
$ composer create-project --prefer-dist khs1994/lnmp ~/lnmp @dev
-
Using dpkg in Debian
$ wget https://github.com/khs1994-docker/lnmp/releases/download/v18.05/khs1994-docker-lnmp_18.05_amd64.deb $ sudo dpkg -i khs1994-docker-lnmp*.deb
-
Using rpm in RHEL
$ wget https://github.com/khs1994-docker/lnmp/releases/download/v18.05/khs1994-docker-lnmp-18.05-1.el7.centos.x86_64.rpm $ sudo yum install khs1994-docker-lnmp*.rpm [-y]
-
Using the convenience script
$ curl -fsSL lnmp.khs1994.com -o lnmp.sh ; sh lnmp.sh
$ cd lnmp
$ ./lnmp-docker.sh up
$ curl 127.0.0.1
Welcome use khs1994-docker/lnmp v18.07 x86_64 With Pull Docker Image
development
MySQL default root password mytest
Start PHP project(e.g, Laravel) in ./app/
folder, And edit nginx config file in ./config/nginx/yourfilename.conf
.
# $ ./lnmp-docker.sh new
$ ./lnmp-docker.sh restart nginx
$redis->connect('127.0.0.1',6379);
$pdo = new \PDO('mysql:host=127.0.0.1;dbname=test;port=3306','root','mytest');
$redis = new \Redis();
$redis->connect('redis', 6379);
$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.sh ssl www.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.sh build
.
# Restart all container
$ ./lnmp-docker.sh restart
$ ./lnmp-docker.sh restart nginx php7
$ ./lnmp-docker.sh stop
$ ./lnmp-docker.sh down
Updates every month, Version name is YY.MM
. For more release information about LNMP Docker Version, see Releases.
Please see Documents.
Name | Docker Image | Version | Based |
---|---|---|---|
ACME.sh | khs1994/acme:2.7.8 |
2.7.8 | Alpine:3.7 |
NGINX | khs1994/nginx:1.15.0-alpine |
1.15.0 | Alpine:3.7 |
HTTPD | httpd:2.4.33-alpine |
2.4.33 | Alpine:3.7 |
MySQL | mysql:8.0.11 |
8.0.11 | Debian:stretch |
MariaDB | mariadb:10.3.7 |
10.3.7 | Debian:jessie |
Redis | redis:4.0.9-alpine |
4.0.9 | Alpine:3.7 |
PHP-FPM | khs1994/php-fpm:7.2.6-alpine3.7 |
7.2.6 | Alpine:3.7 |
Laravel | khs1994/php-fpm:7.2.6-alpine3.7 |
5.6.x | Alpine:3.7 |
Composer | khs1994/php-fpm:7.2.6-alpine3.7 |
1.6.5 | Alpine:3.7 |
PHP-CS-Fixer | khs1994/php-fpm:7.2.6-alpine3.7 |
2.12.0 | Alpine:3.7 |
Memcached | memcached:1.5.8-alpine |
1.5.8 | Alpine:3.7 |
RabbitMQ | rabbitmq:3.7.5-management-alpine |
3.7.5 | Alpine:3.7 |
PostgreSQL | postgres:10.4-alpine |
10.4 | Alpine:3.7 |
MongoDB | mongo:3.7.9 |
3.7.9 | Debian:jessie |
PHPMyAdmin | phpmyadmin/phpmyadmin:latest |
latest | Alpine:3.7 |
Registry | registry:latest |
latest | Alpine:3.4 |
Folder | description |
---|---|
app |
PHP project (HTML, PHP, etc) |
backup |
backup database file |
bin |
PHPer Commands |
config |
configuration file |
dockerfile |
Dockerfile |
logs |
logs file |
scripts |
bash shell script |
- 80
- 443
- 8080
PHPMyAdmin
(Development only)
Easy to generate nginx or apache config, etc. Please use ./lnmp-docker.sh
.
Start Containers as a Service(CaaS)
. For more information, see Documents.
# OS: macOS
$ cd toolkit/linuxkit
$ linuxkit build lnmp.yml
$ linuxkit run -publish 8080:80/tcp lnmp
Open your Browers 127.0.0.1:8080
Please see khs1994-docker#137
Please see khs1994-docker/ci
Please see khs1994-docker/dockerd-tls
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