I have docker file:
FROM anapsix/alpine-java:8_server-jre
RUN apk add --no-cache curl
COPY build/libs/codes-converter-1.0-SNAPSHOT.jar /tmp
COPY mappings.yaml /
ADD load.sh /
RUN chmod +x /load.sh
CMD ["/load.sh"]
load.sh:
#!/bin/bash
exec java -Xdebug -Xrunjdwp:server=y,transport=dt_socket,address=5005,suspend=n -jar tmp/codes-converter-1.0-SNAPSHOT.jar
sleep 10
curl http://localhost:8090/codes-converter/load-mappings
So basically, i need to connect to one of my endpoints of my java app inside the container after the container startup. But I can't figure out how to do it. Where are my mistakes? This curl command seems not working.