Skip to content

Commit

Permalink
Merge pull request #200 from bedroge/riscv_container
Browse files Browse the repository at this point in the history
Add Debian Sid build container with support for `riscv64`, drop support for `ppc64le`
  • Loading branch information
boegel authored Mar 5, 2024
2 parents 34f67e6 + 06f5954 commit 330ab0d
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 8 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/build-and-publish-bootstrap-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ on:
branches:
- main
paths:
- Dockerfile.bootstrap-prefix-debian11
- Dockerfile.bootstrap-prefix*
- bootstrap-prefix.sh

pull_request:
branches:
- main
paths:
- Dockerfile.bootstrap-prefix-debian11
- Dockerfile.bootstrap-prefix*
- bootstrap-prefix.sh

# Declare default permissions as read only.
Expand Down Expand Up @@ -48,7 +48,15 @@ jobs:
- name: Build and push to GitHub Packages
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 #v3.2.0
with:
tags: ghcr.io/${{ env.REPOSITORY_OWNER }}/bootstrap-prefix:debian11
file: Dockerfile.bootstrap-prefix-debian11
platforms: linux/amd64, linux/arm64, linux/ppc64le
tags: ghcr.io/${{ env.REPOSITORY_OWNER }}/bootstrap-prefix:debian-11
file: Dockerfile.bootstrap-prefix-debian-11
platforms: linux/amd64, linux/arm64
push: ${{ github.event_name != 'pull_request' }}

- name: Build and push to GitHub Packages
uses: docker/build-push-action@c56af957549030174b10d6867f20e78cfd7debc5 #v3.2.0
with:
tags: ghcr.io/${{ env.REPOSITORY_OWNER }}/bootstrap-prefix:debian-sid
file: Dockerfile.bootstrap-prefix-debian-sid
platforms: linux/amd64, linux/arm64, linux/riscv64
push: ${{ github.event_name != 'pull_request' }}
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,13 @@ COPY bootstrap-prefix.sh /usr/local/bin/bootstrap-prefix.sh

RUN apt-get update
RUN apt-get install -y gcc g++ make diffutils libgmp-dev perl wget
RUN apt-get install -y git python3-pip python3-cryptography
RUN pip3 install --upgrade pip
RUN pip3 install ansible
RUN apt-get install -y git python3-pip python3-cryptography python3-venv
RUN python3 -m venv --system-site-packages /opt/ansible && \
. /opt/ansible/bin/activate && \
pip3 install --upgrade pip && \
pip3 install ansible && \
ln -s /opt/ansible/bin/ansible* /usr/local/bin/ && \
deactivate
RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh

ENV LC_ALL=C.UTF-8
Expand Down
22 changes: 22 additions & 0 deletions Dockerfile.bootstrap-prefix-debian-sid
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Should move to Trixie whenever riscv64 images are available
FROM debian:sid-20240211-slim

COPY bootstrap-prefix.sh /usr/local/bin/bootstrap-prefix.sh

RUN apt-get update
RUN apt-get install -y gcc g++ make diffutils libgmp-dev perl wget
RUN apt-get install -y git python3-pip python3-cryptography python3-venv
RUN python3 -m venv --system-site-packages /opt/ansible && \
. /opt/ansible/bin/activate && \
pip3 install --upgrade pip && \
pip3 install ansible && \
ln -s /opt/ansible/bin/ansible* /usr/local/bin/ && \
deactivate
RUN chmod 755 /usr/local/bin/bootstrap-prefix.sh

ENV LC_ALL=C.UTF-8
ENV PATH=/usr/local/bin:$PATH

RUN groupadd -g 1000 portage && useradd -ms /bin/bash -u 1000 -g portage portage

ENTRYPOINT ["/usr/local/bin/bootstrap-prefix.sh"]

0 comments on commit 330ab0d

Please sign in to comment.