Skip to content

Commit

Permalink
Added Raspberry Docker (#191)
Browse files Browse the repository at this point in the history
* add docker for raspbian bullseye and raspbian buster

* add raspbian to create-channel

* set python run in venv

* remove raspbian-buster for now

* add EOF newline

* fix comments in bullseye docker

* trigger ci

* try trigger CI again

* add python 3.6-3.10 for deployment

* kick CI

* setup python on raspberry

* add respbian-bullseye to create-release

* install jdk

* remove npm

* fix docker name in comments

* remove jdk and nodejs
  • Loading branch information
xiazhvera authored Oct 19, 2022
1 parent 39c422d commit 6f1e77c
Show file tree
Hide file tree
Showing 3 changed files with 125 additions and 0 deletions.
123 changes: 123 additions & 0 deletions .github/docker-images/raspbian-bullseye/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,123 @@
FROM raspbian/stretch as raspbian-bullseye

###############################################################################
# Upgrade to bullseye from stretch
###############################################################################

RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get full-upgrade -y \
&& apt-get autoremove --purge -y \
&& apt-get clean -y \
# Switch to bullseye repository.
&& sed -i 's/stretch/bullseye/g' /etc/apt/sources.list \
# Update all packages.
&& apt-get update \
&& apt-get upgrade -y \
&& apt-get full-upgrade -y \
&& apt-get autoremove --purge -y \
&& apt-get clean -y


###############################################################################
# Install prereqs
###############################################################################
# Setup nodejs policy for npm
RUN apt-cache policy nodejs
RUN apt-get update -qq \
&& apt-get -y install \
git \
curl \
sudo \
unzip \
clang \
cmake \
# Python
python3.9 \
python3-dev \
python3-pip \
build-essential \
# For PPAs
software-properties-common \
apt-transport-https \
ca-certificates \
&& apt-get clean


# Override python with python3
RUN update-alternatives --install /usr/bin/python python /usr/bin/python3 10

# Install libs for pythons
RUN sudo apt-get install build-essential checkinstall -y
RUN sudo apt-get install libreadline-gplv2-dev libncursesw5-dev libssl-dev libsqlite3-dev tk-dev libgdbm-dev libc6-dev libbz2-dev -y

###############################################################################
# Python/AWS CLI
###############################################################################
RUN python -m pip install --upgrade pip setuptools virtualenv \
&& python -m pip install --upgrade awscli \
&& ln -s `find /opt -name aws` /usr/local/bin/aws \
&& which aws \
&& aws --version



###############################################################################
# Install Python3.6 for Deployment
###############################################################################
WORKDIR /tmp
RUN wget https://www.python.org/ftp/python/3.6.0/Python-3.6.0.tgz \
&& tar zxf Python-3.6.0.tgz \
&& cd Python-3.6.0 \
&& ./configure \
&& make -j 4 \
&& make altinstall \
&& python3.6 -m pip install --no-input wheel \
&& cd ..


###############################################################################
# Install Python3.7 for Deployment
###############################################################################
RUN wget https://www.python.org/ftp/python/3.7.0/Python-3.7.0.tgz \
&& tar zxf Python-3.7.0.tgz \
&& cd Python-3.7.0 \
&& ./configure \
&& make -j 4 \
&& make altinstall \
&& python3.7 -m pip install --no-input wheel \
&& cd ..

###############################################################################
# Install Python3.8 for Deployment
###############################################################################
RUN wget https://www.python.org/ftp/python/3.8.0/Python-3.8.0.tgz \
&& tar zxf Python-3.8.0.tgz \
&& cd Python-3.8.0 \
&& ./configure \
&& make -j 4 \
&& make altinstall \
&& python3.8 -m pip install --no-input wheel \
&& cd ..


###############################################################################
# Install Python3.10 for Deployment
###############################################################################
RUN wget https://www.python.org/ftp/python/3.10.0/Python-3.10.0.tgz \
&& tar zxf Python-3.10.0.tgz \
&& cd Python-3.10.0 \
&& ./configure \
&& make -j 4 \
&& make altinstall \
&& python3.10 -m pip install --no-input wheel \
&& cd ..



###############################################################################
# Install entrypoint
###############################################################################
ADD entrypoint.sh /usr/local/bin/builder
RUN chmod a+x /usr/local/bin/builder
ENTRYPOINT ["/usr/local/bin/builder"]
1 change: 1 addition & 0 deletions .github/workflows/create-channel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
- rhel8-x64
- opensuse-leap
- fedora-34-x64
- raspbian-bullseye
- alpine-3.16-x64
- alpine-3.16-x86
- alpine-3.16-arm64
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ jobs:
- rhel8-x64
- opensuse-leap
- fedora-34-x64
- raspbian-bullseye
- alpine-3.16-x64
- alpine-3.16-x86
- alpine-3.16-arm64
Expand Down

0 comments on commit 6f1e77c

Please sign in to comment.