This is a docker image of a modified version of Python 3.9 that supports running without the global interpreter lock (GIL). See https://github.com/colesbury/nogil.
The images is based on Debian Bullseye.
Dockerfile in your Python app projectFROM nogil/python
WORKDIR /usr/src/app
COPY requirements.txt ./
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
CMD [ "python", "./your-daemon-or-script.py" ]
You can then build and run the Docker image:
$ docker build -t my-python-app .
$ docker run -it --rm --name my-running-app my-python-app
For many simple, single file projects, you may find it inconvenient to write a complete Dockerfile. In such cases, you can run a Python script by using the Python Docker image directly:
$ docker run -it --rm --name my-running-script -v "$PWD":/usr/src/myapp -w /usr/src/myapp nogil/python python your-daemon-or-script.py
View license information for Python 3. This Readme is modified from the official Python image documentation under an MIT license.
Content type
Image
Digest
sha256:993c328dc…
Size
337.5 MB
Last updated
about 2 years ago
docker pull nogil/python