I have SO Windows 10 Pro and this is my docker file:
FROM jboss/wildfly
ADD docker.war /opt/jboss/wildfly/standalone/deployments/
RUN /opt/jboss/wildfly/bin/add-user.sh admin Admin#70365 --silent
EXPOSE 9990
CMD ["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0", "-bmanagement", "0.0.0.0"]
Then, I build the image with the follow command:
docker build --tag=wildfly-occoa .
The next step was exec this line:
docker run -p 8080:9990 wildfly-occoa
And the last lines in the console were:
03:36:19,761 INFO [org.wildfly.extension.undertow] (ServerService Thread Pool -- 75) WFLYUT0021: Registered web context: '/docker' for server 'default-server'
03:36:19,773 INFO [org.jboss.as.server] (ServerService Thread Pool -- 43) WFLYSRV0010: Deployed "docker.war" (runtime-name : "docker.war")
03:36:19,852 INFO [org.jboss.as.server] (Controller Boot Thread) WFLYSRV0212: Resuming server
03:36:19,856 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0060: Http management interface listening on http://0.0.0.0:9990/management
03:36:19,859 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0051: Admin console listening on http://0.0.0.0:9990
03:36:19,859 INFO [org.jboss.as] (Controller Boot Thread) WFLYSRV0025: WildFly Full 15.0.0.Final (WildFly Core 7.0.0.Final) started in 10470ms - Started 409 of 594 services (326 services are lazy, passive or on-demand)
The wildfly console opens without problems in the URL http://localhost:8080/console/index.html but when I try to open the deployed WAR, it opens the webapp in 0.0.0.0:8080/docker
Capture of wildfly web console
I have tried with localhost:8080/docker and 127.0.0.1:8080/docker but the output in browser is "Not found".
Your port mapping -p 8080:9990
is incorrect. The WildFly console and deployed apps are served over different ports. So you can't force the console to run on the standard 8080 port like that.
Take a look at the usage instructions for the jboss/wildfly image.
Note how the port mappings are defined as -p 8080:8080 -p 9990:9990
. That should enable you to access the admin console and any deployed applications.