0

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?

shruti1810
  • 3,920
  • 2
  • 16
  • 28
user3091275
  • 1,013
  • 2
  • 11
  • 27

1 Answers1

0

You need to create your own image based on current one (or modify your current Dockerfile if you already have it) and add java to it. How exactly to add java depends on base image and java which you need. Here the sample for ubuntu based image and oracle java8

After that you could run container from that image. You could use your local image or you could push your image to public or private registry.

Here Dockerfile documentation and best practices for it creation.

ISanych
  • 21,590
  • 4
  • 32
  • 52
  • I followed your advice, I couldn't get my hand over the Dockerfile used by Dokku and tried many things before finding a very ugly working solution. I first run my app using dokku without setting up java, this creates a docker image on my server with node and all the correct dependencies. I then add a dockerfile to my repo referencing my currently running docker image (FROM ) and setting up java. I guess there are cleaner ways to do this, this is my first deployment ever so I am a bit lost. I also tried to use the dokku-apt plugin without success. – user3091275 May 24 '15 at 11:34