Docker Community Forums

Share and learn in the Docker community.

UnknownHostException with custom java app FROM openjdk:8u151-jdk

(Crazywolf669) #1


I’m trying to run a java app using openjdk:8u151-jdk base container. But when my app is starting I have a “ fc085c3b18b8: Name or service not known”

If I run my container with bash, add the hostname to /etc/hosts my application is starting fine.

Here is my dockerfile :

FROM openjdk:8u151-jdk

ENV STB_JAVA_HOME /docker-java-home

ADD /opt/STB/

RUN unzip /opt/STB/ -d /opt/STB/
RUN chmod -R 777 /opt/STB/

CMD ["/opt/STB/STBRuntime/"]

I tried to add “–hostname myruntime” to have a fixed hostname and then try to fix the network configurations but the container is not starting at all in this case :

error during CreateProcess: failure in a Windows system call: The compute system exited unexpectedly

Any help would be appreciated. I’m new to Docker so I may have missed something obvious and seeking for advices.

I’m running Docker for windows Version 17.12.0-ce-rc4-win44 (14896) (Edge) on windows 10 Version 10.0.16299 Numéro 16299 with linux containers enabled.