We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dockerfile
Builds
docker-compose 是一个 docker 实用工具, 可以根据预先的配置, 一键启动一系列容器, 并处理好关联关系
docker-compose
这个是 fiora 的 docker-compose 配置: https://github.com/yinxin630/fiora/blob/master/docker-compose.yaml
常用命令:
docker-compose build
docker-compose up
docker images
docker container ls
docker rm [id]
docker rmi [id]
docker run [name]
docker system df
docker system prune
最后发现是基础镜像的原因, 如果用 node:10 或者 node:10-alpine 作为基础镜像, 就连不上. 用 node:alpine 做为基础镜像, 就可以
node:10
node:10-alpine
node:alpine
原因我也没搞清楚
The text was updated successfully, but these errors were encountered:
No branches or pull requests
自动化构建镜像
Dockerfile
Builds
配置开启自动构建使用 docker-compose
docker-compose
是一个 docker 实用工具, 可以根据预先的配置, 一键启动一系列容器, 并处理好关联关系这个是 fiora 的 docker-compose 配置: https://github.com/yinxin630/fiora/blob/master/docker-compose.yaml
常用命令:
docker-compose build
: 构建镜像docker-compose up
: 运行镜像, --build参数: 构建并运行docker常用命令
docker images
: 列出本地镜像docker container ls
: 列出本地运行中的容器, -a参数: 列出所有容器docker rm [id]
: 删除容器docker rmi [id]
: 删除镜像docker run [name]
: 运行容器, --name:命名 --link:连接其他容器 -p:端口映射 --env:设置环境变量 --net=host:使用宿主机网络docker system df
: 查看磁盘空间占用docker system prune
: 清理空间, 删除不使用的数据遇到的问题
应用容器连不上mongoDB容器
最后发现是基础镜像的原因, 如果用
node:10
或者node:10-alpine
作为基础镜像, 就连不上. 用node:alpine
做为基础镜像, 就可以原因我也没搞清楚
The text was updated successfully, but these errors were encountered: