Skip to content

Tag: docker

Docker and jre 11 in Debug mode

I was trying to get a remote debug session running on my docker container. Actually the debug session always gets blocked by an IOException.. Dockerfile Entrypoint: Any ideas, whats wrong with this? Answer since java 9 you have to specify your adapter, or simply use an escaper for the debug host as such: grea…

docker stats shows zero memory usage even for running containers

I have two containers ran by Docker Swarm: Host OS is Debian Jessie. There are JVM applications in both containers. Why does docker stats show zero memory usage? Should I configure my Java apps somehow to be able to see memory usage in docker stats? Is there some other way to check memory usage? Answer It is …

Build docker image with jetty – when should I build?

I’m working on ‘dockerizing’ a java web application (https://github.com/kermitt2/grobid) which I want to run using jetty. Here the Dockerfile: The current docker image works perfectly, but it requires the application to be built before (it cannot be built from the fresh git clone). For examp…

How to pass System property to docker containers?

So I know you can pass Environment variables to a docker container using -e like: But I need to pass a System Property to a docker container, because this is how I run my JAR: So how can I pass a -D System property in Docker? Like: Answer Use the variable you passed into the container on the java command: