Search code examples
dockerconsolewebsphereadmin

docker websphere can't get the admin console


I am running WebSphere on docker. When I expose the port 9080, I can get the "Welcome to Liberty" page(http://localhost:9080).

docker run -d -e LICENSE=accept -p 9080:9080  docker.io/websphere-liberty

CONTAINER ID: 1d1eb3db6b03
IMAGE:docker.io/websphere-liberty
COMMAND:"/opt/ibm/wlp/bin/ser"
CREATED:17 seconds ago
STATUS:Up 15 seconds
PORTS:9443/tcp, 0.0.0.0:9080->9080/tcp
NAMES: naughty_ritchie

Here is the issue. When I expose the port 9060. I couldn't get the admin console page (http://localhost:9060/admin). Any suggestions?

docker run -d -e LICENSE=accept -p 9060:9060  docker.io/websphere-liberty

CONTAINER ID: 8d9cc97d2656
IMAGE:docker.io/websphere-liberty
COMMAND:"/opt/ibm/wlp/bin/ser"
CREATED:4 minutes ago
STATUS:Up 4 minutes
PORTS: 9080/tcp, 9443/tcp, 0.0.0.0:9060->9060/tcp
NAMES:thirsty_hodgkin


Solution

    1. Created an image with adminCenter FROM websphere-liberty RUN installUtility install adminCenter-1.0 --acceptLicense COPY server.xml /opt/ibm/wlp/usr/servers/defaultServer/ ENV LICENSE accept EXPOSE 80 9080 9448 9443 9060

    2. In the server.xml, put adminCenter-1.0 in the feature of featuremanager. `