Skip to content

Commit a3558cc

Browse files
Adding Python 3.9 to toxic (#12)
1 parent 6064e32 commit a3558cc

File tree

3 files changed

+14
-20
lines changed

3 files changed

+14
-20
lines changed

toxic/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
11
#
22
# Builds a docker image to use for tox runs.
33
#
4-
FROM ubuntu:18.04
4+
FROM ubuntu:20.04
55

66
VOLUME /repo
77

88
WORKDIR /repo
99

10+
ARG DEBIAN_FRONTEND=noninteractive
11+
12+
RUN apt-get update && apt-get -y install apt-utils && apt-get -y install locales
13+
RUN locale-gen en_US.UTF-8
1014

1115
ENV SONAR_SCANNER_VERSION 4.2.0.1873
1216
ENV LANG=en_US.UTF-8

toxic/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,27 +15,27 @@ docker build .
1515
docker images
1616
1717
REPOSITORY TAG IMAGE ID
18-
toxic latest d7ab132649d6
18+
<none> <none> d7ab132649d6
1919
```
2020
```
2121
# We use the range of python environments supported as the version tag.
22-
docker tag d7ab132649d6 uavcan/toxic:py35-py38-sq
22+
docker tag d7ab132649d6 uavcan/toxic:py35-py39-sq
2323
docker login --username=yourhubusername
24-
docker push uavcan/toxic:py35-py38-sq
24+
docker push uavcan/toxic:py35-py39-sq
2525
```
2626

2727
## Testing out the container
2828

2929
Start an interactive session:
3030

3131
```bash
32-
docker run --rm -it -v ${PWD}:/repo uavcan/toxic:py35-py38-sq
32+
docker run --rm -it -v ${PWD}:/repo uavcan/toxic:py35-py39-sq
3333
```
3434

3535
On macintosh you'll probably want to optimize osxfs with something like cached or delegated:
3636

3737
```bash
38-
docker run --rm -it -v ${PWD}:/repo:delegated uavcan/toxic:py35-py38-sq
38+
docker run --rm -it -v ${PWD}:/repo:delegated uavcan/toxic:py35-py39-sq
3939
```
4040

4141
See ["Performance tuning for volume mounts"](https://docs.docker.com/docker-for-mac/osxfs-caching/) for details.
@@ -49,10 +49,10 @@ services:
4949
- docker
5050
5151
before_install:
52-
- docker pull uavcan/toxic:py35-py38-sq
52+
- docker pull uavcan/toxic:py35-py39-sq
5353
5454
script:
55-
- docker run --rm -v $TRAVIS_BUILD_DIR:/repo uavcan/uavcan/toxic:py35-py38-sq /bin/sh -c tox
55+
- docker run --rm -v $TRAVIS_BUILD_DIR:/repo uavcan/uavcan/toxic:py35-py39-sq /bin/sh -c tox
5656
5757
```
5858

@@ -66,7 +66,7 @@ Example pipeline.yml:
6666
plugins:
6767
- docker#v3.5.0:
6868
workdir: /repo
69-
image: "uavcan/toxic:py35-py38-sq"
69+
image: "uavcan/toxic:py35-py39-sq"
7070
propagate-environment: true
7171
mount-ssh-agent: true
7272
```

toxic/provision.sh

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,17 +19,6 @@ set -o errexit
1919
set -o pipefail
2020

2121
# +----------------------------------------------------------+
22-
export DEBIAN_FRONTEND=noninteractive
23-
24-
apt-get update
25-
26-
# setup locales in the container so Python can default to utf-8.
27-
apt-get -y install locales
28-
# from http://jaredmarkell.com/docker-and-locales/
29-
locale-gen en_US.UTF-8
30-
export ENV LANG=en_US.UTF-8
31-
export ENV LANGUAGE=en_US:en
32-
export ENV LC_ALL=en_US.UTF-8
3322

3423
apt-get -y install software-properties-common
3524
apt-get -y install git
@@ -43,6 +32,7 @@ apt-get -y install python3.5
4332
apt-get -y install python3.6
4433
apt-get -y install python3.7
4534
apt-get -y install python3.8
35+
apt-get -y install python3.9
4636
apt-get -y install python3-pip
4737
pip3 install tox
4838

0 commit comments

Comments
 (0)