Tag: java

Docker inspect with unix:///var/run/docker.sock (in Java or Scala)

Docker has lots of interesting information available via unix:///var/run/docker.sock I have been able to map this to a port and I can access /containers/json with GET requests to the port. But… this is not exactly secure. How can I access /containers/json from this raw socket file (in Java or Scala)?

java.lang.IllegalArgumentException starting libreplan in docker

I have a docker repo (here) with source code (here) that is supposed to start libreplan on a tomcat server. There is a docker-compose.yml that sets it up. However, when I start the container, I get a long list of java exceptions: libreplan_1 | ERROR [01-June 05:01:53] [main] org.springframework.web.context.ContextLoader – Context initialization failed libreplan_1 | […]

Connecting java RiakClient to Riak container in Docker

I’ve been struggling for days on connecting Java to Riak running in a Docker container. If someone can help me, i’ll be very greatfull. I’m using RiakClient as API for JAVA. But i can’t figure out how build the RiakClient in the constructor RiakClient(). Maybe is my container setup to be wrong. Here what i’ve […]

mvn jetty:run not reflecting changes when run inside docker

I have a simple Tic-tac-toe Java web app https://github.com/rajaraodv/tictactoe It is a Maven project. It uses Jetty to run the web app by doing mvn jetty:run While it is running locally, I can easily modify a JavaScript file and see the changes immediately when I refresh the browser. But, when I run it via Docker […]

How to share java-packages between docker-container via link?

I am completely new to Docker and don’t really understand how “link” works between containers. I wrote a little java-program with some packages and I want each package to run on a different container. I would like the packages to find each other through the link and communicate with each other. The goal is, that […]

Authorization settings problems for tomcat while deploying with docker

I am new here and also new to the docker and tomcat. I am trying to deploy a maven project with docker. I have managed to create an image for tomcat in docker and created a container from that image. or gives me the apache tomcat opening page; but whenever i try to […]

Reconstruct dockerfile from image with java docker client

I’m using docker in java code through java docker client (https://github.com/docker-java/docker-java) and I need to analyze what’s coming from docker hub by user request starting docker pull operation (it’s going to be a service running user-defined code related to computational biology in docker container on cluster remotely). I’ve found this approach based on ruby: https://github.com/CenturyLinkLabs/dockerfile-from-image/blob/master/dockerfile-from-image.rb […]

Run Java command line from node.js dokku container

I have a dokku container running a node.js app, my backend needs to use java8 to run some command lines. I have the following error message from my server: [Error: Command failed: /bin/sh -c java /bin/sh: 1: java: not found ] How can I make java8 accessible inside my dokku container?

How to deploy to a java microservice to docker container after a successful jenkins build?

I have setup a build pipeline in jenkins using the build pipeline plugin. The second step of the pipeline is to deploy to a dev environment. As I have micro services, I want to deploy each micro service in a docker container. I have manually configured the container already to run these microservices but now […]

How to avoid NoSuchMethodError in docker-client test program

I am using the following Java test program as a proof of concept for invoking docker-client in a Jersey 1.x project. public static void main(String[] args) throws Exception { final DockerClient docker = new DefaultDockerClient(“”); final String id = “wg”; final String[] command = {“bash”, “-c”, “ps”, “-ef”}; final String execId = docker.execCreate(id, command, DockerClient.ExecParameter.STDOUT, […]

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