Skip to content
This repository has been archived by the owner on Jan 9, 2024. It is now read-only.

Commit

Permalink
Add explicit Python versions including 3.8 and 3.9 (#4)
Browse files Browse the repository at this point in the history
Now instead of installing just the "dev" versions of 3.6 and 3.7, we explicitly install the latest versions of 3.6, 3.7, 3.8, and 3.9.

I also added a `pyenv global` to "activate" all of these Python versions, so that the repositories no longer need to rely on a `.python-version` file to find the appropriate versions.

Built and tested locally:

```sh
> docker run -it sceptre
~ $ python3.6
Python 3.6.13 (default, Apr 21 2021, 18:35:04)
[GCC 10.2.1 20201203] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
~ $ python3.7
Python 3.7.10 (default, Apr 21 2021, 18:36:29)
[GCC 10.2.1 20201203] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
~ $ python3.8
Python 3.8.8 (default, Mar 15 2021, 13:10:14)
[GCC 10.2.1 20201203] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
~ $ python3.9
Python 3.9.4 (default, Apr 21 2021, 18:40:51)
[GCC 10.2.1 20201203] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
~ $
```
  • Loading branch information
tarkatronic authored Apr 21, 2021
1 parent 1275c76 commit 3f4a557
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ RUN apk add --update --no-cache \
cargo

RUN pip3 install --no-cache-dir virtualenv \
&& pip3 install --no-cache-dir tox \
&& addgroup -g 3434 circleci \
&& adduser -D -u 3434 -G circleci -s /bin/bash circleci
&& pip3 install --no-cache-dir tox \
&& addgroup -g 3434 circleci \
&& adduser -D -u 3434 -G circleci -s /bin/bash circleci

USER circleci

Expand All @@ -41,7 +41,10 @@ ENV LANG=C.UTF-8 \

RUN git clone --depth 1 https://github.com/pyenv/pyenv.git $PYENV_HOME \
&& rm -rfv $PYENV_HOME/.git \
&& pyenv install 3.6-dev \
&& pyenv install 3.7-dev
&& pyenv install 3.6.13 \
&& pyenv install 3.7.10 \
&& pyenv install 3.8.9 \
&& pyenv install 3.9.4 \
&& pyenv global system 3.6.13 3.7.10 3.8.9 3.9.4

CMD ["/bin/sh"]

0 comments on commit 3f4a557

Please sign in to comment.