Reputation: 609
I've an Akka HTTP service, built in Java, that creates an executable jar. Outside of the container, it runs alright. Inside the container, it starts fine. But I'm not able to access the service.
Dockerfile:
FROM java:openjdk-8
COPY target/my-service-api-1.0.0-allinone.jar /app.jar
EXPOSE 8181 8282 8383
ENTRYPOINT ["java", "-jar", "/app.jar"]
Build:
docker image build -t my-service-api:v1 .
Run:
docker run -p 8181:8181 -p 8282:8282 -p 8383:8383 --rm my-service-api:v1
Any ideas on what I might be missing? I've been searching around for a while with no success so far.
Upvotes: 0
Views: 261
Reputation: 1240
You need to bind your service to 0.0.0.0:container_port
(inside container), mount container_port
to host_port
and check that host_port
open on host.
Upvotes: 1