[Docker]Error response from daemon: Address already in use
Error invoking remote method 'docker-start-container': Error: (HTTP code 403) unexpected - Address already in use
·
1、问题
创建容器报错
docker run -e TZ="Asia/Shanghai" -d -p 80:80 -v \\wsl$\Ubuntu\home\nginx\conf.d:/etc/nginx/conf.d/ -v \\wsl$\Ubuntu\home\nginx\log:/var/log/nginx/ -v \\wsl$\Ubuntu\home:/data/web/ --net mynetwork --ip 172.18.0.1 --restart=always --name nginx nginx
2、排查问题
docker network inspect mynetwork
3、解决方法
容器换IP
docker run -e TZ="Asia/Shanghai" -d -p 80:80 -v \\wsl$\Ubuntu\home\nginx\conf.d:/etc/nginx/conf.d/ -v \\wsl$\Ubuntu\home\nginx\log:/var/log/nginx/ -v \\wsl$\Ubuntu\home:/data/web/ --net mynetwork --ip 172.18.0.2 --restart=always --name nginx nginx
更多推荐
已为社区贡献1条内容
所有评论(0)