Skip to content

Commit 10a9113

Browse files
chore(docs): Docs for using custom Python versions.
1 parent 2bf0689 commit 10a9113

1 file changed

Lines changed: 26 additions & 0 deletions

File tree

README.md

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,32 @@ FROM playpauseandstop/docker-python
2626
- [nano](https://www.nano-editor.org) 2.7.4
2727
- [openssh-client](https://packages.debian.org/stretch/openssh-client)
2828

29+
### Python versions
30+
31+
By default, `docker-python` image uses latest stable Python version. But some
32+
other versions supported as well.
33+
34+
List of supported Python versions are (`<PY_VERSION>` -> base Docker image):
35+
36+
- `py35` -> `python:3.5.7-slim-stretch`
37+
- `py36` -> `python:3.6.8-slim-stretch`
38+
- `py37` -> `python:3.7.3-slim-stretch`
39+
40+
To use custom Python version, use tags in your Dockerfile as:
41+
42+
```
43+
FROM playpauseansdtop/docker-python:<VERSION>-<PY_VERSION>
44+
```
45+
46+
For example, to use `1.0.3` version of `docker-python` with Python 3.6 base
47+
image:
48+
49+
```
50+
FROM playpauseandstop/docker-python:1.0.3-py36
51+
```
52+
53+
[List of all available tags](https://hub.docker.com/r/playpauseandstop/docker-python/tags)
54+
2955
## Development
3056

3157
To build an image:

0 commit comments

Comments
 (0)