###安装环境:mac、window
在官网下载了 docker for mac/window 安装成功后。 国外的Lardock : Laradock 由于GWF的原因所以我推荐,国内版 : Lardock 配置详情:https://laravel-china.org/topics/3374/the-laradock-version-of-the-v2-changed-a-little-into-the-domestic-mirror
配置验证 auth.json 出现下面的问题一样是没有配置auth.json
复制代码
Step 12 : COPY ./auth.json /home/laradock/.composer/auth.json ERROR: Service 'workspace' failed to build: lstat auth.json: no such file or directory
cd workspace
cp auth.json.example auth.json
复制代码
这时候去 GitHub 创建 ersonal access tokens 创建后,复制那串密钥
vi auth.json
复制代码
{
"bitbucket-oauth": {},
"github-oauth": {
"github.com": "刚刚配置的密钥key"
},
"gitlab-oauth": {},
"http-basic": {}
}
复制代码
在 window 系统出现这个错误的时候
复制代码
the input device is not a TTY. If you are using mintty, try prefixing the command with 'winpty'
winpty 你要的命令
例如: winpty docker-compose exec --user=laradock workspace bash
复制代码
ERROR: for applications Cannot create container for service applications: C: drive is not shared. Please share it in Docker for Windows Settings Encountered errors while bringing up the project.
这个时候去 docker 右键 Settings 后选择第二个 Shared Drives 勾选你要的磁盘点击应用即可。
复制代码