diff --git a/.github/workflows/build-and-publish-bootstrap-container.yml b/.github/workflows/build-and-publish-bootstrap-container.yml index ba7ef495..3451fe15 100644 --- a/.github/workflows/build-and-publish-bootstrap-container.yml +++ b/.github/workflows/build-and-publish-bootstrap-container.yml @@ -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. @@ -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' }} diff --git a/Dockerfile.bootstrap-prefix-debian11 b/Dockerfile.bootstrap-prefix-debian-11 similarity index 56% rename from Dockerfile.bootstrap-prefix-debian11 rename to Dockerfile.bootstrap-prefix-debian-11 index 6c564328..fca32c0f 100644 --- a/Dockerfile.bootstrap-prefix-debian11 +++ b/Dockerfile.bootstrap-prefix-debian-11 @@ -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 diff --git a/Dockerfile.bootstrap-prefix-debian-sid b/Dockerfile.bootstrap-prefix-debian-sid new file mode 100644 index 00000000..2a9e70ff --- /dev/null +++ b/Dockerfile.bootstrap-prefix-debian-sid @@ -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"]