a docker-compose demo
docker及docker-compose 安装略
/etc/docker/daemon.json 加入以下内容:
{
"registry-mirrors": [
"https://kfwkfulq.mirror.aliyuncs.com",
"https://2lqq34jg.mirror.aliyuncs.com",
"https://pee6w651.mirror.aliyuncs.com",
"https://registry.docker-cn.com",
"http://hub-mirror.c.163.com"
],
"dns": ["8.8.8.8","8.8.4.4"]
}
docker-compose -f docker-compose.yml up -d --build
若是Windows环境写的在Linux环境部署
报错:
standard_init_linux.go:211: exec user process caused "no such file or directory"
解决:
则需要使用vi编辑器修改docker-entrypoint.sh, fileformat=unix