赞
踩
问题:
docker.errors.InvalidArgument: "host" network_mode is incompatible with port
1.24.0以前可以network_mode: host和ports: xxx可以一起使用
version: "3.0"
services:
mail-service:
image: 192.168.17.198/xiaoqiangzai/mail-service:38
container_name: mail-service
network_mode: host
privileged: true
restart: always
ports:
- "8082:8082"
environment:
- "ENVIRONMENT=dev"
解决:
更换新版本后,network_mode:是host的要去掉ports
version: "3.0"
services:
mail-service:
image: 192.168.17.198/xiaoqiangzai/mail-service:38
container_name: mail-service
network_mode: host
privileged: true
restart: always
environment:
- "ENVIRONMENT=dev"
问题:
docker更换日志驱动为loki后,docker-compose启动容器出现告警
WARNING: no logs are available with the 'loki' log driver
解决:
升级docker-compose版本,我这里从1.24.0升级到1.29.2就解决了
作者(Author):小强崽
来源(Source):https://www.wuduoqiang.com/archives/docker-compose常见问题
协议(License):署名-非商业性使用-相同方式共享 4.0 国际 (CC BY-NC-SA 4.0)
版权(Copyright):商业转载请联系作者获得授权,非商业转载请注明出处。 For commercial use, please contact the author for authorization. For non-commercial use, please indicate the source.
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。