Start LNMP In Less than 2 minutes Powered By Docker Compose.
LNMP Docker is supported on Linux, macOS, Windows 10 on x86_64, and Debian (Raspberry Pi3) on arm.
Changelog
Updates every month, Version name is YY.MM. For more release information about LNMP Docker Version, see Releases.
Prerequisites
To use LNMP Docker, you need:
-
Docker CE 17.12 Stable +
-
Docker Compose 1.18.0+
Quick Start
Windows 10
Please see Windows 10.
Install
Pick one method install LNMP Docker.
-
using the convenience script
$ curl -fsSL lnmp.khs1994.com -o lnmp.sh ; sh lnmp.sh -
using
git clone$ git clone --recursive https://github.com/khs1994-docker/lnmp.git # $ git clone --recursive git@github.com:khs1994-docker/lnmp.git
Start
$ cd lnmp
$ ./lnmp-docker.sh development
$ curl 127.0.0.1
Welcome use khs1994-docker/lnmp v18.02 x86_64 With Pull Docker Image
development
Start PHP Project
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
Issue SSL certificate
Powered by
acme.sh
$ ./lnmp-docker.sh ssl www.khs1994.com
Only Support
dnspod.cnDNS,Please set API key and id in.envfile. Support Self-Signed SSL certificate, for more information, see Documents.
List LNMP Container
$ docker container ls -a -f label=com.khs1994.lnmp
Use Self-Build Docker Image
Edit Dockerfile in ./dockerfile/*/Dockerfile, then exec ./lnmp-docker.sh build.
Restart
# Restart all container
$ ./lnmp-docker.sh restart
$ ./lnmp-docker.sh restart nginx php7
Stop
$ ./lnmp-docker.sh stop
Stop and remove
$ ./lnmp-docker.sh down
Run LNMP On Kubernets
For more information please see Documents
Overview
Features
Please see Documents.
What's inside
| Name | Docker Image | Version | Based |
|---|---|---|---|
| NGINX | nginx:1.13.8-alpine |
![]() |
Alpine:3.5 |
| Apache | httpd:2.4.29-alpine |
![]() |
Alpine:3.6 |
| MySQL | mysql:8.0.3 |
![]() |
Debian:jessie |
| MariaDB | mariadb:10.3.4 |
![]() |
Debian:jessie |
| Redis | khs1994/redis:4.0.8-alpine |
![]() |
Alpine:3.7 |
| PHP-FPM | khs1994/php-fpm:7.2.2-alpine3.7 |
![]() |
Alpine:3.7 |
| Laravel | khs1994/php-fpm:7.2.2-alpine3.7 |
![]() |
Alpine:3.7 |
| Composer | khs1994/php-fpm:7.2.2-alpine3.7 |
![]() |
Alpine:3.7 |
| Memcached | memcached:1.5.4-alpine |
![]() |
Alpine:3.7 |
| RabbitMQ | khs1994/rabbitmq:3.7.2-management-alpine |
![]() |
Alpine:3.7 |
| PostgreSQL | khs1994/postgres:10.1-alpine |
![]() |
Alpine:3.6 |
| MongoDB | mongo:3.7.1 |
![]() |
Debian:jessie |
Folder Structure
| Folder | description |
|---|---|
app |
PHP project (HTML, PHP, etc) |
backup |
backup database file |
config |
configuration file |
dockerfile |
Dockerfile |
logs |
logs file |
scripts |
bash shell script |
tmp |
Composer cache file ,etc |
Exposed Ports
- 80
- 443
CLI
Easy to access Laravel, Laravel artisan, composer, PHP-CLI, etc. Please use ./lnmp-docker.sh.
Run in Production
Start Containers as a Service(CaaS). For more information, see Documents.
LinuxKit
# OS: macOS
$ cd linuxkit
$ linuxkit build lnmp.yml
$ linuxkit run -publish 8080:80/tcp lnmp
Open your Browers 127.0.0.1:8080
Who use in Production?
khs1994.com
TLSv1.3
Please see khs1994-website/tls-1.3
CI/CD
Please see khs1994-docker/ci
Docker Daemon TLS
Please see khs1994-docker/dockerd-tls
Documents
Contributing
Please see Contributing
Thanks
More Information
- LNMP Docker Containers default configuration file
- 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
Donate
Please see zan.khs1994.com











