我是Docker的新手,可以从这里学习:https://www.lynda.com/Docker-tutorials/Run-container-ports-volumes/576584/604557-4.html?org=mastercard.com
我已经浏览了该链接,响应似乎令人困惑:https://github.com/docker/compose/issues/3277
错误:
docker container run -d --name web -p 8080:8080 jboss/wildfly
4f75dcbf8a56262a22239b5ef146a475f7d877a1707392561bb9419542510478
docker: Error response from daemon: driver failed programming external connectivity on endpoint web (645121a4674ed37eaeefb46c2afcff6512477dba4dd98f93d4f8f5e40750f111): Error starting userland proxy: listen tcp 0.0.0.0:8080: bind: address already in use.
$ sudo netstat -nlp | grep 8080
tcp6 0 0 :::8080 :::* LISTEN 2527/dockerd
8080 / tcp 部分让我感到困惑,不确定为什么会出现。
docker container ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
c65137b42e56 jboss/wildfly "/opt/jboss/wildfl..." 10 minutes ago Up 10 minutes 8080/tcp, 0.0.0.0:9090->9090/tcp web
答案 0 :(得分:0)
如果您使用的是Mac,请尝试
docker container run -d --name web -p 127.0.0.1:8080:8080 jboss/wildfly
祝你好运
Daniel Farina