Sign inSign up

sourcemation/python

By sourcemation

•Updated 13 days ago

Image
0

5.9K

sourcemation/python repository overview

⁠Python packaged by Sourcemation

Python is one of the most popular programming languages. Its simplicity, emphasis on readability and a dozen of modules make it the perfect choice for various work domains, ranging from web development to AI/ML.

⁠Important Note: Python 3.9 is End-of-Life (EOL)

This Python distribution, version 3.9.X, is provided specifically for compatibility workflows that require an older Python environment. Python 3.9 is no longer officially supported by the Python Software Foundation and does not receive security updates.

While the Python 3.9 environment itself is outdated, this Sourcemation image is built on our regularly updated and patched sourcemation/rocky-9 base image. This ensures that the underlying system components are current, even though the Python version itself is EOL.

This Python distribution is provided by the downstream Rocky Linux 9 packaging team in the version respective to that system (3.9.18). For user convenience, the pip package manager is shipped as well.

⁠Usage

Run a temporary container with the Python REPL (don't forget the -it argument).

docker run --rm -it sourcemation/python:latest

To run the shell in the container, use the following command:

docker run --rm -it sourcemation/python:latest
⁠Advanced usage examples

Serve the contents of the current directory with Python's builtin HTTP server with the port 8000 forwarded:

docker run --rm -p 8000:8000 -v "${PWD}:/your-project" -w "/your-project" -it sourcemation/python:latest python3 -m http.server 8000

Build an MkDocs project from the current directory and serve it:

docker run --rm -p 8000:8000 -v "${PWD}:/your-project" -w "/your-project" -it sourcemation/python:latest sh -c 'pip3 install -r requirements.txt && mkdocs build && mkdocs serve'

⁠Environment Vars, Ports, Volumes

This image uses the following environment variables:

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
APP_VERSION="3.9.X - set during build"
APP_NAME="python"

This image exposes the following ports:

  • 8000 : the default Python's http.server port

Please note that the ports need to be either manually forwarded with the -p option or let Docker choose some for you with the -P option.

⁠Contributing and Reporting Issues

Your contributions are valued! Feel free to suggest enhancements or request new images by opening an issue, or submit your own contributions via pull requests to the Sourcemation GitHub repository.

Disclaimer: The sourcemation/python image is not affiliated with the Python Software Foundation. The respective companies and organisations own the trademarks mentioned in the offering. The sourcemation/python image is a separate project and is maintained by Sourcemation⁠.

⁠Extra notes

⁠Image and its components Risk Analysis report

A detailed risk analysis report of the image and its components can be found on the Sourcemation platform⁠.

For more information, check out the overview on the Python⁠ page.

⁠Licenses

The base license for the solution (Python) is the Python License⁠. The licenses for each component shipped as part of this image can be found on the image's appropriate Sourcemation entry⁠.

Tag summary

Content type

Image

Digest

sha256:f07b9c679…

Size

66.1 MB

Last updated

13 days ago

docker pull sourcemation/python