Reputation: 21
enter image description here I have built a docker image of IBM WAS 9 Base for Windows. My image is named as was9_new. After the image is successfully built, I use docker run command as follows : docker run --name was_test -h was_test -p 9043:9043 -p 9443:9443 -d was9_new
It returns as output a container ID, and then exits
After that when I try to open the admin console - https://localhost:9043/ibm/console/login.do?action=secure
I get an error This site cannot be reached localhost refused to connect
Is it because after the docker run command outputs a container id, it exits? Or something else needs to be done to make the admin console work.
I have referred to instructions here - https://hub.docker.com/r/ibmcom/websphere-traditional/
The only difference is, I have built my own image for windows
Upvotes: 2
Views: 656
Reputation: 1229
Printing the container ID and returning to the shell is normal behavior because you specified -d which runs the container in the background. You should be able to see your container with docker ps
.
How long after startup did you wait to try to access the admin console? WAS Base can take several minutes to start up depending on system load and other factors, but docker printing the ID only means the container was created, not that it has finished initializing.
Check that 9043 is the adminhost_secure port, or try using just http:// instead of https:// in the admin console URL.
Can you enter the container with docker exec -it was_test bash
, and attempt to access the URL from within the container? wget https://localhost:9043/ibm/console
. If you get a message about not trusting the certificate, the server is accepting connections, but for some reason docker isn't forwarding your browser's requests into the container.
These steps should help you narrow down whether it is WAS, or docker, that is not cooperating.
Upvotes: 1