Skip to content

Commit

Permalink
ansible,docker: install Python 3.9 in Stretch RPi's (#2606)
Browse files Browse the repository at this point in the history
This also changes the base image to balenalib/rpi-raspbian:stretch.
The old one is no longer maintained.

Refs: #2507
  • Loading branch information
targos committed Apr 19, 2021
1 parent 9f89312 commit 79d8678
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
15 changes: 13 additions & 2 deletions ansible/roles/jenkins-worker/templates/rpi_stretch.Dockerfile.j2
@@ -1,4 +1,4 @@
FROM resin/rpi-raspbian:stretch
FROM balenalib/rpi-raspbian:stretch

ENV LC_ALL=C \
USER={{ server_user }} \
Expand Down Expand Up @@ -26,7 +26,9 @@ RUN apt-get update && apt-get dist-upgrade -y && apt-get install -y \
openssh-client \
gzip \
xz-utils \
curl && \
curl \
libffi-dev \
zlib1g-dev && \
apt-get clean -y && \
rm -rf /var/lib/apt/lists/*

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

RUN mkdir /python && \
cd /python && \
curl https://github.com/python/cpython/archive/refs/tags/v3.9.4.tar.gz -L --output v3.9.4.tar.gz && \
tar xf v3.9.4.tar.gz && \
cd cpython-3.9.4 && \
./configure && \
make install && \
rm -rf /python

RUN addgroup \
--gid {{ server_user_gid.stdout_lines[0] }} \
{{ server_user }} && \
Expand Down
2 changes: 0 additions & 2 deletions ansible/roles/jenkins-worker/vars/main.yml
Expand Up @@ -122,11 +122,9 @@ raspberry_pi: {
{ name: 'jessie', template: 'rpi_jessie.Dockerfile.j2' }
],
armv7l: [
{ name: 'jessie', template: 'rpi_jessie.Dockerfile.j2' },
{ name: 'stretch', template: 'rpi_stretch.Dockerfile.j2' }
],
arm64: [
{ name: 'jessie', template: 'rpi_jessie.Dockerfile.j2' },
{ name: 'stretch', template: 'rpi_stretch.Dockerfile.j2' }
]
}
Expand Down

0 comments on commit 79d8678

Please sign in to comment.