โ
โ
โ
โ
Pyspark docker images! ๐๏ธ
docker run -it wiseupdata/pyspark bash
Pyspark 3.4.0
Ubuntu 22.04.2 LTS end of life April 2032 - Official
Python 3.10 - Official
OpenJDK8 - Officialโ
Kubernetes Ready and Tested!
Userspark Restrict user NO sudo
UserUbuntu sudo
Simple shell, type:
pyspark and have fun with Python and Spark! โค๏ธspark and have fun with Scala and Spark! ๐ซpython import the pyspark and have fun!Made with A.I. contribution ๐ค
This setup it's the same for the tags: 3.4.0 and 3.4.0-ubuntu-22.04
๐ This docker was built on top of Apache, to be resilient and ready for debug, so it's light enough! If you need something different try the pure Apache docker!
Example with specific version ๐ป:
docker run -it wiseupdata/pyspark:3.4.0 bash
docker run -it wiseupdata/pyspark:3.4.0-ubuntu-22.04 bash
pyspark
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/__ / .__/\_,_/_/ /_/\_\ version 3.4.0
/_/
Using Python version 3.10.11 (main, May 2 2023 14:04:10)
pyspark
Welcome to
____ __
/ __/__ ___ _____/ /__
_\ \/ _ \/ _ `/ __/ '_/
/___/ .__/\_,_/_/ /_/\_\ version 3.4.0
/_/
Using Scala version 2.12.17 (OpenJDK 64-Bit Server VM, Java 1.8.0_372)
pysparkType python or pyspark and test!
from pyspark.sql import SparkSession
spark = SparkSession.builder.appName("TestPySpark").getOrCreate()
data = [("Alice", 1), ("Bob", 2), ("Charlie", 3)]
df = spark.createDataFrame(data, ["Name", "Age"])
df.show()
spark.stop()
exit()
Type spark and test!
import org.apache.spark.sql.SparkSession
val spark = SparkSession.builder.appName("Spark Scala Test").getOrCreate()
val df = Seq((1, "John"), (2, "Jane"), (3, "Jim")).toDF("id", "name")
df.show()
spark.stop()
:quit
Dockerfile and run the command bellowdocker build -t pyspark ./versions/3.4.0 --no-cache
docker run -it --rm pyspark bash
docker run --name pyspark -d --rm pyspark bash run
docker exec -it pyspark bash
# Exit and kill
exit
docker rm pyspark -f
docker login -u wiseupdata
docker tag pyspark wiseupdata/pyspark
docker tag pyspark wiseupdata/pyspark:3.4.0
docker tag pyspark wiseupdata/pyspark:3.4.0-ubuntu-22.04
docker tag pyspark wiseupdata/pyspark:3.4.0-ubuntu-22.04-jdk8
docker push wiseupdata/pyspark
docker push wiseupdata/pyspark:3.4.0
docker push wiseupdata/pyspark:3.4.0-ubuntu-22.04
docker push wiseupdata/pyspark:3.4.0-ubuntu-22.04-jdk8
docker run -it wiseupdata/pyspark:3.4.0 bash
list all container
docker ps -a
kill all containers โ ๏ธ
docker rm $(docker ps -a -q) -f
list the images
docker image ls -a
delete one image
docker image rm pyspark -f
Delete all images โ ๏ธ
docker image rm $(docker image ls -a ) -f
Force run โ ๏ธ
docker run -it --entrypoint /bin/bash pyspark
Silvio Liborio
๐ง [email protected]โ
Content type
Image
Digest
sha256:c22eac3b1โฆ
Size
1.1 GB
Last updated
over 3 years ago
docker pull wiseupdata/pyspark