ci.docker.websphere-traditional
ci.docker.websphere-traditional copied to clipboard
-e UPDATE_HOSTNAME=true causes error /work/start_server.sh: line 15: hostname: command not found
Saw this error scroll by
/work/start_server.sh: line 15: hostname: command not found
... while using
docker run --name twasv9 -h twasv9 -v $(pwd)/PASSWORD:/tmp/PASSWORD -p 9043:9043 -p 9443:9443 -e UPDATE_HOSTNAME=true -d ibmcom/websphere-traditional:latest
It seems to be harmless but while waiting for ISC to come up I was afraid it was an issue.
I am using:
ibmcom/websphere-traditional latest sha256:76d87075809ed63e764aa47964a87f57af6278063542e088c7b066de40cc1784 6752978e5b0c 5 days ago 1.88GB
It seems like the dockerhub doc no longer has -e UPDATE_HOSTNAME=true
in examples, but I stashed it away in a cheatsheet ages ago. I guess it maybe broke under UBI-min or something like that.
I wanted to bind to a host name so I can use nginx for reverse proxy. Same error 'hostname' not found.
Would be great if you could test with a docker compose like below
version: '3'
services:
ibm-was:
image: ibmcom/websphere-traditional:latest
container_name: ibmwas
environment:
UPDATE_HOSTNAME: "true"
SERVER_NAME: "ibmwas.pkml01.local" #Put the FQDN here.
volumes:
- ./PASSWORD:/tmp/PASSWORD
# ports:
# - 9043:9043 # use nginx-proxy-mgr, no need to expose
# - 9443:9443
networks:
- my-org-network
networks:
my-org-network:
name: my-org-network
https://github.com/WASdev/ci.docker.websphere-traditional#how-to-run-this-image still has this variable, latest images still report the hostname problem
I've just had the same problem while attempting to set up a SIBLink between two containers I'm guessing the problem is in the start_server.sh script in the line:
wsadmin.sh -lang jython -conntype NONE -f /work/updateHostName.py ${NODE_NAME:-"DefaultNode01"} $(hostname)
Hacking this to be ${HOST_NAME} seems to fix things for me, but I don't know whether there's anything else being done with 'hostname' elsewhere in the scripts.