1 Star 4 Fork 0

oceandlnu / laradock

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
MIT

laradock Laradock 文档说明


docker 安装

进入 下载地址 选择最新的包下载

tar zxvf docker-18.03.1-ce.tgz
sudo cp docker/* /usr/bin/

启动

sudo dockerd &

验证是否安装成功

docker -v
docker info

为当前用户增加执行权限

sudo groupadd docker
sudo usermod -aG docker $USER

docker-compose 安装

#如果shell是zsh,切换到bash安装
bash
sudo curl -L https://github.com/docker/compose/releases/download/1.21.2/docker-compose-$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose

替换国内源

编辑 sudo nano /etc/docker/daemon.json 如果不存在则创建。如果文件为空,添加以下内容。

参考链接

{
    "registry-mirrors": [
        "http://0ed8bcb8.m.daocloud.io"
    ],
    "insecure-registries": []
}

验证

docker-compose --version

安装部署

项目安装

git clone git@gitee.com:oceandlnu/laradock.git
cd laradock
cp env.example .env
docker-compose up -d nginx mysql redis

切换PHP版本(默认7.1)

比如切换到 7.2 版本:编辑 .env 修改 PHP_VERSION=7.2,编辑 ./php-fpm/Dockerfile 去掉 COPY ./sources72.list /etc/apt/sources.list 前面的注释,将 COPY ./sources.list /etc/apt/sources.list 注释。

修改host

sudo nano /etc/hosts

添加下面这行

127.0.0.1   dock.xxx.com

版权信息

作者 @ocean

博客 ocean's blog

2018 年 07月 08日

The MIT License (MIT) Copyright 2018 <Mahmoud Zalt> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

简介

laradock 国内定制 展开 收起
Docker
MIT
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
Docker
1
https://gitee.com/oceandlnu/laradock.git
git@gitee.com:oceandlnu/laradock.git
oceandlnu
laradock
laradock
master

搜索帮助