0

I have a spring boot application(java) that when run normally needs java 8, my python scripts in directory and the dir must exist where i keep the generated jar and python3.4 on the system

I am able to create a docker container of my spring boot application and package the jar and the scripts/ directory but i am unable to package python3.4 and hence my application is not running as a container. The application comes up but the functionality is not right as the python is missing. Here is my docker file. Can someone help how to package package python3.4 also along with java

cat Dockerfile

FROM java:8

MAINTAINER ABC
EXPOSE 9598
CMD java -jar /data/my-SNAPSHOT.jar
ADD dockerbuild/my-SNAPSHOT.jar /data/my-SNAPSHOT.jar
ADD dockerbuild/scripts/ /data/scripts/
curiousengineer
  • 2,196
  • 5
  • 40
  • 59
  • im not sure i understand ... is there any special problem to install python using apt-get or from sources ? – chenchuk Feb 14 '16 at 20:21
  • I do not know what exactly do i need to do to be able to package both python and java because when i use from for java and then from for python, only python comes. So looks like i cannot use from more than once. To ask the question more explicitly, what i want to know is how can i package, python3.4 and java both, my scripts folder and jar file all in a docker container – curiousengineer Feb 14 '16 at 21:01
  • FROM is to specify the source image to start with, then you can run commands with RUN, see here : https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/ – chenchuk Feb 14 '16 at 21:05

1 Answers1

0

You need to install python in the docker image you creating. You can use docker RUN for that. Depending on the linux version your container is built on, you need to add the following to the Docker file:

RUN yum install -y python 

or

RUN apt-get install -y python
jny
  • 8,007
  • 3
  • 37
  • 56