Tag: java

How to pass System property to docker containers?

So I know you can pass Environment variables to a docker container using -e like: docker run -it -e “var=var1” myDockerImage But I need to pass a System Property to a docker container, because this is how I run my JAR: java -Denviroment=dev -jar myjar.jar So how can I pass a -D System property in […]

What Docker base image (`FROM`) for Java Spring Boot?

What Docker base image (FROM) for Java Spring Boot application? I am just starting with docker, and I see that FROM inside Dockerfile can define image for Java like FROM java:8 If I am building using Gradle (or Maven) is the better base image to start to avoid configuring later what is common for Gradle/Maven […]

Encoding Problems when running an app in docker (Python, Java, Ruby, …) with Ubuntu Containers (ascii, utf-8)

On my own PC the application runs nice, but when it gets deployed into docker, it fails because of invalid characters. I am using the ubuntu:lastest container and python3, java and ruby.

Mac host doesn't like Docker container port forwarding

I am experimenting with Docker for the first time, and am trying to get a Spring Boot web app to run inside a Docker container. I am building the app (which packages up into a self-contained jar) and then adding it to the Docker image (which is what I want). You can find my SSCCE […]

maven package docker:build – connection refused

I am trying to directly build a docker image with maven with mvn package docker:build. Docker is running and docker ps shows me my containers, so I assume that everything is running correctly. I do get the following error though: [ERROR] Failed to execute goal com.spotify:docker-maven-plugin:0.2.3:build (default-cli) on project reservierung: Exception caught: java.util.concurrent.ExecutionException: com.spotify.docker.client.shaded.javax.ws.rs.ProcessingException: o […]

What's the best practice to send logs to graylog from a JVM application which runs within a docker container?

I’m using graylog as central logging server and i’m using a gelf log4j2-appender to send the log messages to graylog. This works fine. Now i created a docker image of my application and i’m able to run my software as docker container. Using docker i also log to stdout (console-appender) to get the application logs […]

Docker error when pulling Java 8 image – “failed to register layer”

I am trying to pull the latest official Java docker image (java:8), but I keep getting a failed to register layer error. The Java 7 and 9 docker images download successfully. I am running OS X El Capitan version 10.11.1. > docker -v Docker version 1.10.0, build 590d5108 > docker-machine -v docker-machine version 0.6.0, build […]

Eclipse IDE within docker

I do dev on a Windows machine and using docker via docker-machine. Due to help from @VonC was able to achieve folder share from windows dev folder to docker container. The IDE I would like to use for Java development is Eclipse. But I would not like to install the whole java system on my […]

Where to keep Dockerfile's in a project?

I am gaining knowledge about Docker and I have the following questions Where are Dockerfile’s kept in a project? Are they kept together with the source? Are they kept outside of the source? Do you have an own Git repository just for the Dockerfile? If the CI server should create a new image for each […]

Docker communication between two container with Java

I don’t find my answer on any post. I use a container with a project under PHP on a container which works fine. I want to link Java which is launch on another container. I use the “java:8″ image configure like this : engine: build: ./docker/engine/ volumes: – “.:/home/docker:rw” – “./docker/engine/php.ini:/usr/local/etc/php/conf.d/custom.ini:ro” links: – “db:db” – […]

Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.