Skip to content

Commit 79d8678

Browse files
authored
ansible,docker: install Python 3.9 in Stretch RPi's (#2606)
This also changes the base image to balenalib/rpi-raspbian:stretch. The old one is no longer maintained. Refs: #2507
1 parent 9f89312 commit 79d8678

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

ansible/roles/jenkins-worker/templates/rpi_stretch.Dockerfile.j2

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM resin/rpi-raspbian:stretch
1+
FROM balenalib/rpi-raspbian:stretch
22

33
ENV LC_ALL=C \
44
USER={{ server_user }} \
@@ -26,7 +26,9 @@ RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
2626
openssh-client \
2727
gzip \
2828
xz-utils \
29-
curl && \
29+
curl \
30+
libffi-dev \
31+
zlib1g-dev && \
3032
apt-get clean -y && \
3133
rm -rf /var/lib/apt/lists/*
3234

@@ -36,6 +38,15 @@ RUN update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-6 50 && \
3638
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-6 50 && \
3739
update-alternatives --install /usr/bin/cc cc /usr/bin/gcc-6 50
3840

41+
RUN mkdir /python && \
42+
cd /python && \
43+
curl https://github.com/python/cpython/archive/refs/tags/v3.9.4.tar.gz -L --output v3.9.4.tar.gz && \
44+
tar xf v3.9.4.tar.gz && \
45+
cd cpython-3.9.4 && \
46+
./configure && \
47+
make install && \
48+
rm -rf /python
49+
3950
RUN addgroup \
4051
--gid {{ server_user_gid.stdout_lines[0] }} \
4152
{{ server_user }} && \

ansible/roles/jenkins-worker/vars/main.yml

-2
Original file line numberDiff line numberDiff line change
@@ -122,11 +122,9 @@ raspberry_pi: {
122122
{ name: 'jessie', template: 'rpi_jessie.Dockerfile.j2' }
123123
],
124124
armv7l: [
125-
{ name: 'jessie', template: 'rpi_jessie.Dockerfile.j2' },
126125
{ name: 'stretch', template: 'rpi_stretch.Dockerfile.j2' }
127126
],
128127
arm64: [
129-
{ name: 'jessie', template: 'rpi_jessie.Dockerfile.j2' },
130128
{ name: 'stretch', template: 'rpi_stretch.Dockerfile.j2' }
131129
]
132130
}

0 commit comments

Comments
 (0)