Sign inSign up

paularlott/knot-python

By paularlott

•Updated about 7 hours ago

Python Knot image with Python, pip and uv for running apps inside Knot spaces.

Image
Developer tools
0

1.4K

paularlott/knot-python repository overview

⁠knot-python

A Python⁠ development image for knot⁠ spaces, combining knot-ubuntu with the Python interpreter, pip, and the uv⁠ package manager. It is a pure runtime image — no web server — so you run your own process or app server (e.g. uvicorn, gunicorn).

It inherits the full knot entrypoint, runtime user, rsyslog logging and startup-hook framework from knot-ubuntu.

⁠Tags

All tags are multi-arch (linux/amd64, linux/arm64); see Docker Hub⁠ for the current list.

Python is installed from the Ubuntu 26.04 archive; the <version> tag is the Python major.minor (e.g. 3.14). Each release is also tagged <version>-<BUILD_DATE>.

⁠Usage

docker run -d \
  -e KNOT_SERVER=https://knot.example.com \
  -e KNOT_USER=alice \
  -v knot_home:/home \
  paularlott/knot-python:3.14

Then, in the space:

python -m venv .venv && . .venv/bin/activate
pip install httpx
python -c 'import httpx; print(httpx.__version__)'

Or with uv⁠:

uv init app && cd app && uv run python main.py

⁠How it works

Builds on knot-ubuntu:26.04, which ships Python 3.14 in its archive. python3.14, -venv and -dev are installed, and python / python3 are symlinked (in /usr/local/bin, ahead of /usr/bin) to the chosen version without disturbing system tooling that calls /usr/bin/python3. pip is upgraded, and uv is installed system-wide.

⁠Environment variables

Built on knot-ubuntu, so it supports the common knot variables:

VariableDefaultDescription
KNOT_USERknotRuntime user (uid 1000); created if missing
KNOT_SERVER(unset)knot server URL; if set, the agent is downloaded and started
KNOT_AGENT_ENDPOINT(unset)Agent endpoint reported to the server
KNOT_SPACEID(unset)Space identifier
KNOT_SERVICE_PASSWORD(auto-generated UUID)Shared service password
KNOT_SSHD(unset)Set to native to start sshd
KNOT_SSH_PORT2222Port for the SSH daemon
KNOT_SYSLOG_PORT1514Syslog forward target (0 disables forwarding)
TZEtc/UTCTimezone

Python-specific:

VariableDefaultDescription
PYTHON_VERSION(build-time)The Python major.minor (e.g. 3.14)

⁠Volumes

  • /home — persistent home directory; virtualenvs and projects live here.

⁠License

Python is PSF License⁠. This image's packaging — the Dockerfile and supporting scripts/configs — is Apache License 2.0⁠.

Source: paularlott/knot-base-images⁠.

Tag summary

Content type

Image

Digest

sha256:baefce2a0…

Size

330.6 MB

Last updated

about 7 hours ago

docker pull paularlott/knot-python:3.14-20260929