Hello,
Trying to run both java and http service in a single Alpine image, somehow httpd service not starting
below is the dockerfile used
FROM java:8-jdk-alpine
RUN apk add --no-cache apache2-proxy apache2-ssl apache2-utilsWORKDIR /var/www/
COPY html/ .WORKDIR /var/backed
COPY backed-0.0.1-SNAPSHOT.jar .EXPOSE 80/tcp
EXPOSE 8085/tcpCMD [“sh”,“-c”,“/usr/sbin/httpd -D FOREGROUND && java -jar /var/backed/backed-0.0.1-SNAPSHOT.jar”]
Docker run command:
sudo docker run -p 8080:80 -p 8085:8085 server:1.0
AH00558: httpd: Could not reliably determine the server’s fully qualified domain name, using 172.17.0.2. Set the ‘ServerName’ directive globally to suppress this message
██╗ ██╗ ██╗ ████████╗ ███████╗ ██████╗ ████████╗ ████████╗ ███████╗
██║ ██║ ██║ ╚══██╔══╝ ██╔═══██╗ ██╔════╝ ╚══██╔══╝ ██╔═════╝ ██╔═══██╗
██║ ████████║ ██║ ███████╔╝ ╚█████╗ ██║ ██████╗ ███████╔╝
██╗ ██║ ██╔═══██║ ██║ ██╔════╝ ╚═══██╗ ██║ ██╔═══╝ ██╔══██║
╚██████╔╝ ██║ ██║ ████████╗ ██║ ██████╔╝ ██║ ████████╗ ██║ ╚██╗
╚═════╝ ╚═╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══════╝ ╚═╝ ╚═╝
:: JHipster :: Running Spring Boot 2.1.8.RELEASE ::
:: https://www.jhipster.tech ::
Posted snipped of the container run above, I think the httpd service quits immediately.
I could able to view jhipster home page on 172.17.0.2:8085, but frontend 172.17.0.2:8080 or 172.17.0.2 is connection timed out.
How can make the front end work?
Thanks,
Mohan