From 9b3b3bb902eccd1b46091c240606ad1a1e590308 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 15:04:50 +0200 Subject: [PATCH 01/22] chore(IDX): create minimal image --- .github/minimal-runner-image/Dockerfile | 6 +++ .github/minimal-runner-image/TAG | 1 + .../workflows/build-minimal-runner-image.yml | 39 +++++++++++++++++++ 3 files changed, 46 insertions(+) create mode 100644 .github/minimal-runner-image/Dockerfile create mode 100644 .github/minimal-runner-image/TAG create mode 100644 .github/workflows/build-minimal-runner-image.yml diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile new file mode 100644 index 00000000000..aa0576454da --- /dev/null +++ b/.github/minimal-runner-image/Dockerfile @@ -0,0 +1,6 @@ +FROM ubuntu:20.04 + +RUN apt -yq update && \ + apt -yq install --no-install-recommends git curl wget + + CMD ["/bin/bash"] diff --git a/.github/minimal-runner-image/TAG b/.github/minimal-runner-image/TAG new file mode 100644 index 00000000000..49d59571fbf --- /dev/null +++ b/.github/minimal-runner-image/TAG @@ -0,0 +1 @@ +0.1 diff --git a/.github/workflows/build-minimal-runner-image.yml b/.github/workflows/build-minimal-runner-image.yml new file mode 100644 index 00000000000..95d8e8bdaa2 --- /dev/null +++ b/.github/workflows/build-minimal-runner-image.yml @@ -0,0 +1,39 @@ +name: Build Minimal Runner Image + +on: + workflow_dispatch: + pull_request: + paths: + - '.github/workflows/build-minimal-runner-image.yml' + - '.github/minimal-runner-image/**' + +jobs: + build-and-upload-minimal-image: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@a530e948adbeb357dbca95a7f8845d385edf4438 # v3 + + - name: Login to GHCR + uses: docker/login-action@5f4866a30a54f16a52d2ecb4a3898e9e424939cf # v3 + with: + registry: ghcr.io + username: ${{ github.actor }} + password: ${{ secrets.GITHUB_TOKEN }} + + - name: Determine TAG + id: tag + run: | + echo "TAG=$(cat ${{ github.workspace }}/.github/minimal-runner-image/TAG)" >> $GITHUB_ENV + + - name: Build and push image + uses: docker/build-push-action@eb539f44b153603ccbfbd98e2ab9d4d0dcaf23a4 # v5 + with: + context: ${{ github.workspace}}${{inputs.context }} + push: true + tags: | + ghcr.io/${{ inputs.org }}/${{ inputs.image-name }}:${{ env.TAG }} + ghcr.io/${{ inputs.org }}/${{ inputs.image-name }}:latest From c29cc1275fa789d5e46db8532ef8d7378933e888 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 15:09:07 +0200 Subject: [PATCH 02/22] update --- .github/workflows/build-minimal-runner-image.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-minimal-runner-image.yml b/.github/workflows/build-minimal-runner-image.yml index 95d8e8bdaa2..a5966b9d76b 100644 --- a/.github/workflows/build-minimal-runner-image.yml +++ b/.github/workflows/build-minimal-runner-image.yml @@ -35,5 +35,5 @@ jobs: context: ${{ github.workspace}}${{inputs.context }} push: true tags: | - ghcr.io/${{ inputs.org }}/${{ inputs.image-name }}:${{ env.TAG }} - ghcr.io/${{ inputs.org }}/${{ inputs.image-name }}:latest + ghcr.io/${{ github.repository_owner }}/minimal-runner-image:${{ env.TAG }} + ghcr.io/${{ github.repository_owner }}/minimal-runner-image:latest From 0e2d558dd8cb9b6a81c3122b8f74c94d1d34e64c Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 15:11:02 +0200 Subject: [PATCH 03/22] update context --- .github/workflows/build-minimal-runner-image.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build-minimal-runner-image.yml b/.github/workflows/build-minimal-runner-image.yml index a5966b9d76b..6bd20c9685b 100644 --- a/.github/workflows/build-minimal-runner-image.yml +++ b/.github/workflows/build-minimal-runner-image.yml @@ -32,7 +32,7 @@ jobs: - name: Build and push image uses: docker/build-push-action@eb539f44b153603ccbfbd98e2ab9d4d0dcaf23a4 # v5 with: - context: ${{ github.workspace}}${{inputs.context }} + context: ${{ github.workspace}}/.github/minimal-runner-image push: true tags: | ghcr.io/${{ github.repository_owner }}/minimal-runner-image:${{ env.TAG }} From 84e15258dfa17b67c84e5f7548af8f86a8755c88 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 15:13:14 +0200 Subject: [PATCH 04/22] add permission --- .github/workflows/build-minimal-runner-image.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/build-minimal-runner-image.yml b/.github/workflows/build-minimal-runner-image.yml index 6bd20c9685b..d4eddfb7ccc 100644 --- a/.github/workflows/build-minimal-runner-image.yml +++ b/.github/workflows/build-minimal-runner-image.yml @@ -7,6 +7,10 @@ on: - '.github/workflows/build-minimal-runner-image.yml' - '.github/minimal-runner-image/**' +permissions: + contents: read + packages: write + jobs: build-and-upload-minimal-image: runs-on: ubuntu-latest From 77fb64957cd489d03023b570a4f10af9bdac11b1 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 15:43:55 +0200 Subject: [PATCH 05/22] add ca-certificates --- .github/minimal-runner-image/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index aa0576454da..dc4c9b4362b 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -1,6 +1,6 @@ FROM ubuntu:20.04 RUN apt -yq update && \ - apt -yq install --no-install-recommends git curl wget + apt -yq install --no-install-recommends git curl wget ca-certificates CMD ["/bin/bash"] From 9734c36eba4fd7cbeafa95fd305dfea28477b758 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 15:53:52 +0200 Subject: [PATCH 06/22] add ubuntu user --- .github/minimal-runner-image/Dockerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index dc4c9b4362b..442566147ed 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -3,4 +3,8 @@ FROM ubuntu:20.04 RUN apt -yq update && \ apt -yq install --no-install-recommends git curl wget ca-certificates - CMD ["/bin/bash"] +RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu + +USER ubuntu + +CMD ["/bin/bash"] From 80a0bda10b84306d7612f4e47bbb67736cc33df5 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 16:30:44 +0200 Subject: [PATCH 07/22] add all --- .github/minimal-runner-image/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 442566147ed..aa759a8d720 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -3,7 +3,8 @@ FROM ubuntu:20.04 RUN apt -yq update && \ apt -yq install --no-install-recommends git curl wget ca-certificates -RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu +RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ + groupadd -g 1001 buildifier && useradd -ms /bin/bash -u 1001 -g 1001 buildifier USER ubuntu From acc0fdad38d6aebb0e4d038c715dc64bf1c49ed0 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 16:35:16 +0200 Subject: [PATCH 08/22] add suo --- .github/minimal-runner-image/Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index aa759a8d720..4a99ce0dfc9 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -4,7 +4,8 @@ RUN apt -yq update && \ apt -yq install --no-install-recommends git curl wget ca-certificates RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ - groupadd -g 1001 buildifier && useradd -ms /bin/bash -u 1001 -g 1001 buildifier + groupadd -g 1001 buildifier && useradd -ms /bin/bash -u 1001 -g 1001 buildifier && \ + echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers USER ubuntu From 7d4b13f3acccfca144e8f590c0c0a10b063df3a9 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 16:43:03 +0200 Subject: [PATCH 09/22] switch to runner use --- .github/minimal-runner-image/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 4a99ce0dfc9..17e72f6212c 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -4,9 +4,9 @@ RUN apt -yq update && \ apt -yq install --no-install-recommends git curl wget ca-certificates RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ - groupadd -g 1001 buildifier && useradd -ms /bin/bash -u 1001 -g 1001 buildifier && \ + groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers -USER ubuntu +USER runner CMD ["/bin/bash"] From 5344e2817c79669268e1da0bfedf97162728a082 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 17:05:04 +0200 Subject: [PATCH 10/22] install cargo --- .github/minimal-runner-image/Dockerfile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 17e72f6212c..b144b536671 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 RUN apt -yq update && \ - apt -yq install --no-install-recommends git curl wget ca-certificates + apt -yq install --no-install-recommends git curl wget ca-certificates sudo RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ @@ -9,4 +9,9 @@ RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ USER runner +# Install rustup and cargo +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ + . "$HOME/.cargo/env" && \ + rustup default stable + CMD ["/bin/bash"] From d1fdbadf915dd9f04799f324343ea48dce1875f9 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 17:11:48 +0200 Subject: [PATCH 11/22] try again --- .github/minimal-runner-image/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index b144b536671..0f2e9aa530e 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -11,7 +11,6 @@ USER runner # Install rustup and cargo RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ - . "$HOME/.cargo/env" && \ - rustup default stable + /bin/bash -c "source $HOME/.cargo/env && rustup default stable" CMD ["/bin/bash"] From fee95e4ab8e6d3ddc3f7c79f5d843090ca57e135 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 22:45:49 +0200 Subject: [PATCH 12/22] add rust --- .github/minimal-runner-image/Dockerfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 0f2e9aa530e..67d3f722a69 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -10,7 +10,9 @@ RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ USER runner # Install rustup and cargo -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y && \ - /bin/bash -c "source $HOME/.cargo/env && rustup default stable" +ARG RUST_VERSION=1.79.0 +RUN curl --fail https://sh.rustup.rs -sSf \ + | sh -s -- -y --default-toolchain ${RUST_VERSION}-x86_64-unknown-linux-gnu --no-modify-path && \ + rustup default ${RUST_VERSION}-x86_64-unknown-linux-gnu CMD ["/bin/bash"] From 9528f051fdf6f94572257d13f21aef9a66fd26f6 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 22:55:12 +0200 Subject: [PATCH 13/22] add path --- .github/minimal-runner-image/Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 67d3f722a69..7516bd95ebb 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -9,6 +9,9 @@ RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ USER runner +# Set PATH for runner user +ENV PATH=/ic/bin:/home/runner/.cargo/bin:/home/runner/.local/bin:$PATH + # Install rustup and cargo ARG RUST_VERSION=1.79.0 RUN curl --fail https://sh.rustup.rs -sSf \ From 8f2e524df3ec696db8e4ee2e51a3dd5419c598e3 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 23:01:30 +0200 Subject: [PATCH 14/22] add --- .github/minimal-runner-image/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 7516bd95ebb..a4e35bdabee 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 RUN apt -yq update && \ - apt -yq install --no-install-recommends git curl wget ca-certificates sudo + apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ From 63e9eb917727bd67ea9bf4084119e2cb573cec08 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 23:12:10 +0200 Subject: [PATCH 15/22] remove ubuntu user --- .github/minimal-runner-image/Dockerfile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index a4e35bdabee..f9bdb59ade0 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -3,8 +3,7 @@ FROM ubuntu:20.04 RUN apt -yq update && \ apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential -RUN groupadd -g 1000 ubuntu && useradd -ms /bin/bash -u 1000 -g 1000 ubuntu && \ - groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ +RUN groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers USER runner From 15e1bdeb6669749e821fa22a813200f1a138d941 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 23:12:51 +0200 Subject: [PATCH 16/22] change --- .github/minimal-runner-image/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index f9bdb59ade0..00fdd938aed 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -1,8 +1,5 @@ FROM ubuntu:20.04 -RUN apt -yq update && \ - apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential - RUN groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers @@ -11,6 +8,9 @@ USER runner # Set PATH for runner user ENV PATH=/ic/bin:/home/runner/.cargo/bin:/home/runner/.local/bin:$PATH +RUN apt -yq update && \ + apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential + # Install rustup and cargo ARG RUST_VERSION=1.79.0 RUN curl --fail https://sh.rustup.rs -sSf \ From 79a35ca2bab48af63516344d8e5b137fe376316f Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Tue, 30 Jul 2024 23:16:37 +0200 Subject: [PATCH 17/22] change --- .github/minimal-runner-image/Dockerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 00fdd938aed..f9bdb59ade0 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -1,5 +1,8 @@ FROM ubuntu:20.04 +RUN apt -yq update && \ + apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential + RUN groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers @@ -8,9 +11,6 @@ USER runner # Set PATH for runner user ENV PATH=/ic/bin:/home/runner/.cargo/bin:/home/runner/.local/bin:$PATH -RUN apt -yq update && \ - apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential - # Install rustup and cargo ARG RUST_VERSION=1.79.0 RUN curl --fail https://sh.rustup.rs -sSf \ From 42bdfaa5522246c957fa5416ba4099d9e5fe8305 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Wed, 31 Jul 2024 08:30:36 +0200 Subject: [PATCH 18/22] add --- .github/minimal-runner-image/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index f9bdb59ade0..ab5a7648fde 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 RUN apt -yq update && \ - apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential + apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential jq RUN groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers From d0509f73c982f3a1f06ae7a34e50440afd1863ea Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Wed, 31 Jul 2024 08:39:07 +0200 Subject: [PATCH 19/22] add --- .github/minimal-runner-image/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index ab5a7648fde..38e1ab772d0 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -1,7 +1,7 @@ FROM ubuntu:20.04 RUN apt -yq update && \ - apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential jq + apt -yq install --no-install-recommends git curl wget ca-certificates sudo build-essential jq xxd RUN groupadd -g 1001 runner && useradd -ms /bin/bash -u 1001 -g 1001 runner && \ echo "ALL ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers From ce8f032a68df7a8a36d765606bfe9264cfbeaa28 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Wed, 31 Jul 2024 08:57:38 +0200 Subject: [PATCH 20/22] update --- .github/minimal-runner-image/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index 38e1ab772d0..c2e33b45260 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -15,6 +15,6 @@ ENV PATH=/ic/bin:/home/runner/.cargo/bin:/home/runner/.local/bin:$PATH ARG RUST_VERSION=1.79.0 RUN curl --fail https://sh.rustup.rs -sSf \ | sh -s -- -y --default-toolchain ${RUST_VERSION}-x86_64-unknown-linux-gnu --no-modify-path && \ - rustup default ${RUST_VERSION}-x86_64-unknown-linux-gnu + rustup default stable CMD ["/bin/bash"] From 6d85777ef2863df1ee1c6f096a893bbb13b97e6b Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Wed, 31 Jul 2024 09:02:05 +0200 Subject: [PATCH 21/22] change it back --- .github/minimal-runner-image/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/minimal-runner-image/Dockerfile b/.github/minimal-runner-image/Dockerfile index c2e33b45260..38e1ab772d0 100644 --- a/.github/minimal-runner-image/Dockerfile +++ b/.github/minimal-runner-image/Dockerfile @@ -15,6 +15,6 @@ ENV PATH=/ic/bin:/home/runner/.cargo/bin:/home/runner/.local/bin:$PATH ARG RUST_VERSION=1.79.0 RUN curl --fail https://sh.rustup.rs -sSf \ | sh -s -- -y --default-toolchain ${RUST_VERSION}-x86_64-unknown-linux-gnu --no-modify-path && \ - rustup default stable + rustup default ${RUST_VERSION}-x86_64-unknown-linux-gnu CMD ["/bin/bash"] From bae701da9398e68377c71b59a6cb9c795b1ee0e4 Mon Sep 17 00:00:00 2001 From: Carly Gundy Date: Wed, 31 Jul 2024 10:51:30 +0200 Subject: [PATCH 22/22] add readme --- .github/minimal-runner-image/README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 .github/minimal-runner-image/README.md diff --git a/.github/minimal-runner-image/README.md b/.github/minimal-runner-image/README.md new file mode 100644 index 00000000000..6f148f34bbb --- /dev/null +++ b/.github/minimal-runner-image/README.md @@ -0,0 +1,3 @@ +# Minimal Runner Image + +We maintain a minimal image that can be used for all self-hosted runners across dfinity. The reason why it is stored in the `ic` repo, is because GHCR can only create public images from a repo that is public. It is also a central repo that many developers use and can easily refer to. This is an alternative to using the full `ic-build` image which is much larger.