docker-lnmp icon indicating copy to clipboard operation
docker-lnmp copied to clipboard

lnmp docker 基础镜像

docker-lnmp

分支-branch

  • base 最小化的lnmp环境
  • master 集成其它的一些服务, 会根据测试开源应用而集成不同的服务来测试. 比较不稳定.

基本使用 build environment

step1

insatll docker

step2

execute docker-compose up -d

build done

已构建镜像

Laravel-5.5: docker pull hellomjw/php:laravel

php-5.6: docker pull hellomjw/php:5.6

Docker基本命令

构建一个镜像

docker build -t my-name . 

查看本地镜像

docker images

运行一个镜像

docker run -idt <镜像ID>

查看正在运行的容器

docker ps 
docker ps -qa #查看所有容器

进入容器

docker exec -it <容器ID> bash # 或 sh  

推送容器的线上仓库

# https://hub.docker.com 注册用户 创建一个仓库地址
sudo docker login #登录
sudo docker commit -m "推送说明" -a "推送人名字" <容器ID> <你创建的仓库地址> eg:ouruser/sinatra:v2
sudo docker push <你创建的仓库地址>

相关资料

Blog-地址

laravel5.5搭建方法

Docker常用命令