Ramraj Chandradevan
Ramraj Chandradevan

Reputation: 173

How to use python3 inside openjdk Docker base?

I am trying to Dockerize a system where I should run bash script, which calls python3 script and then jar file. But openjdk Docker base doesn't come with python, and its container doesn't seem to support ubuntu based apt-get install commands. Any suggestions ?

Upvotes: 0

Views: 279

Answers (1)

Ben W
Ben W

Reputation: 1050

You just need to use the java container based on buster instead of buster-slim. openjdk:buster

To test it run the following

docker run -it openjdk:buster /bin/bash
apt update
apt -y upgrade
apt -y install python3

Upvotes: 2

Related Questions