loum/pyjdk

By loum

Updated 2 months ago

Python3 and a JVM on Ubuntu noble 24.04

Image
Developer Tools
0

2.2K

A vanilla, base Docker image for further install of PySpark. That is, it gives you python3 and a JVM ready for a PySpark install.

If used as a standalone image, it is possible to get a Python REPL as per the following:

docker run --rm -ti loum/pyjdk:latest

What's new with latest

Supported tags and respective Dockerfile links

OpenJDK 11

PySpark REPL

PySpark is not installed by default. This is to keep the image size as small as possible. However, the environment is ready to support a PySpark install. loum/pyjdk can serve as a base image for your larger project. If you only want a quick and simple PySpark REPL, then provide a PySpark version to the BUILD_PYSPARK_VERSION environment variable:

docker run --rm -ti --name pyjdk --env PYSPARK_VERSION=3.5.3 loum/pyjdk:python3.11-openjdk11

This will dynamically pip install the PYSPARK_VERSION into a running container.

Python REPL

To use the container as a standard Python REPL:

docker run --rm -ti --name pyjdk loum/pyjdk:python3.11-openjdk11 python

Running a Python command:

docker run --rm -ti --name pyjdk loum/pyjdk:python3.11-openjdk11 python -c "import sys;print(sys.version)"

Java executable

To run java command:

docker run --rm -ti --name pyjdk loum/pyjdk:python3.11-openjdk11 java -version

Quick reference

Docker Pull Command

docker pull loum/pyjdk