Hi and thanks for taking the time :)
I am currently facing some problems with sbt-native-packager and Docker. I am relatively new to this. Actually, this is my first attempt. And here is my problem: I have an Actor that should respond to HTTP requests. It works great if I run it without dockers. Now I want it to be built as a Dockercontainer (there are server satellites, so I use docker compose). So I use sbt-native-packager, but now that I hit localhost: 4444 I just get "Not Found". So I think something is wrong with my dockerBuild settings. I just can't understand that :(
Here is the code:
Settings
lazy val graphiteprocSetting = eventprocSettings ++ Seq(
name := "graphite-processor",
dockerBaseImage := "nimmis/java:oracle-8-jdk",
daemonUser in Docker := "root",
debianChangelog in Debian := Some(file("*")),
mainClass in Compile := Some("*.StreamProcessorKafkaToGraphite"))
Addition
lazy val graphiteproc = Project(
id = "graphiteproc",
base = file("modules/graphiteproc"),
settings = graphiteprocSetting
).enablePlugins(DebianPlugin, JavaServerAppPackaging, DebianDeployPlugin, DockerPlugin, BuildInfoPlugin)
Docker-compose.yml
graphiteprocessor:
image: graphite-processor:0.1.13-SNAPSHOT
volumes:
- ./conf:*
environment:
JAVA_OPTS: "-Dconfig.file=*"
ports:
- "4444:4444"
links:
- graphite
- kafka
docker checkout output:
"NetworkSettings": {
...
"Ports": {
"4444/tcp": [
{
"HostIp": "0.0.0.0",
"HostPort": "4444"
}
]
},
...
"Gateway": "172.17.0.1",
...
"IPAddress": "172.17.0.2",
"Networks": {
"bridge": {
...
"Gateway": "172.17.0.1",
"IPAddress": "172.17.0.2",
...
}
}
}