From 7bb11b4cd4fb9eb04c42f64571c1cd715bdbc32a Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 19 Mar 2025 16:43:21 -0700 Subject: [PATCH 01/11] updated sysdig TF code to work with notification_channel creation --- tf-sysdig/alerts.tf | 3 +-- tf-sysdig/notification_channel.tf | 19 ++++++++++--------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/tf-sysdig/alerts.tf b/tf-sysdig/alerts.tf index 07ca481..54a6b4a 100644 --- a/tf-sysdig/alerts.tf +++ b/tf-sysdig/alerts.tf @@ -28,8 +28,7 @@ resource "sysdig_monitor_alert_v2_metric" "pod_metrics" { } notification_channels { - # TODO: hard coded id for now. This shold be generated and referenced. - id = 238924 + id = sysdig_monitor_notification_channel_email.tf_sre.id renotify_every_minutes = 60 } diff --git a/tf-sysdig/notification_channel.tf b/tf-sysdig/notification_channel.tf index bd52289..b771f8c 100644 --- a/tf-sysdig/notification_channel.tf +++ b/tf-sysdig/notification_channel.tf @@ -1,9 +1,10 @@ -# # Define a notification channel -# resource "sysdig_monitor_notification_channel_email" "tf_sre" { -# name = "TF SRE" -# recipients = ["chris@bashbang.com"] -# enabled = true -# notify_when_ok = true -# notify_when_resolved = true -# send_test_notification = true -# } +# Define a notification channel +resource "sysdig_monitor_notification_channel_email" "tf_sre" { + name = "TF SRE" + enabled = true + recipients = ["chris@bashbang.com"] + notify_when_ok = true + notify_when_resolved = true + send_test_notification = true + share_with_current_team = true # IMPORTANT - Needed to share with the current team only. Default would be all teams which results in a 403 error +} From 94916972afd6833b9497e3ae675b0e0209cc34e7 Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 19 Mar 2025 16:47:51 -0700 Subject: [PATCH 02/11] experiments with pytorch --- .../.devcontainer/devcontainer.json | 41 +++++++++++++++++++ .../.devcontainer/docker-compose.yml | 26 ++++++++++++ pytorch-experiments/.github/dependabot.yml | 12 ++++++ pytorch-experiments/helloworld.py | 9 ++-- pytorch-experiments/requirements.txt | 3 +- 5 files changed, 85 insertions(+), 6 deletions(-) create mode 100644 pytorch-experiments/.devcontainer/devcontainer.json create mode 100644 pytorch-experiments/.devcontainer/docker-compose.yml create mode 100644 pytorch-experiments/.github/dependabot.yml diff --git a/pytorch-experiments/.devcontainer/devcontainer.json b/pytorch-experiments/.devcontainer/devcontainer.json new file mode 100644 index 0000000..f3039be --- /dev/null +++ b/pytorch-experiments/.devcontainer/devcontainer.json @@ -0,0 +1,41 @@ +// For format details, see https://aka.ms/devcontainer.json. For config options, see the +// README at: https://github.com/devcontainers/templates/tree/main/src/docker-existing-docker-compose +{ + "name": "Existing Docker Compose (Extend)", + + // Update the 'dockerComposeFile' list if you have more compose files or use different names. + // The .devcontainer/docker-compose.yml file contains any overrides you need/want to make. + "dockerComposeFile": [ + "../docker-compose.yaml", + "docker-compose.yml" + ], + + // The 'service' property is the name of the service for the container that VS Code should + // use. Update this value and .devcontainer/docker-compose.yml to the real service name. + "service": "pytorch", + + // The optional 'workspaceFolder' property is the path VS Code should open by default when + // connected. This is typically a file mount in .devcontainer/docker-compose.yml + "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}" + + // Features to add to the dev container. More info: https://containers.dev/features. + // "features": {}, + + // Use 'forwardPorts' to make a list of ports inside the container available locally. + // "forwardPorts": [], + + // Uncomment the next line if you want start specific services in your Docker Compose config. + // "runServices": [], + + // Uncomment the next line if you want to keep your containers running after VS Code shuts down. + // "shutdownAction": "none", + + // Uncomment the next line to run commands after the container is created. + // "postCreateCommand": "cat /etc/os-release", + + // Configure tool-specific properties. + // "customizations": {}, + + // Uncomment to connect as an existing user other than the container default. More info: https://aka.ms/dev-containers-non-root. + // "remoteUser": "devcontainer" +} diff --git a/pytorch-experiments/.devcontainer/docker-compose.yml b/pytorch-experiments/.devcontainer/docker-compose.yml new file mode 100644 index 0000000..90398ca --- /dev/null +++ b/pytorch-experiments/.devcontainer/docker-compose.yml @@ -0,0 +1,26 @@ +version: '3.8' +services: + # Update this to the name of the service you want to work with in your docker-compose.yml file + pytorch: + # Uncomment if you want to override the service's Dockerfile to one in the .devcontainer + # folder. Note that the path of the Dockerfile and context is relative to the *primary* + # docker-compose.yml file (the first in the devcontainer.json "dockerComposeFile" + # array). The sample below assumes your primary file is in the root of your project. + # + # build: + # context: . + # dockerfile: .devcontainer/Dockerfile + + volumes: + # Update this to wherever you want VS Code to mount the folder of your project + - ..:/workspaces:cached + + # Uncomment the next four lines if you will use a ptrace-based debugger like C++, Go, and Rust. + # cap_add: + # - SYS_PTRACE + # security_opt: + # - seccomp:unconfined + + # Overrides default command so things don't shut down after the process ends. + command: /bin/sh -c "while sleep 1000; do :; done" + diff --git a/pytorch-experiments/.github/dependabot.yml b/pytorch-experiments/.github/dependabot.yml new file mode 100644 index 0000000..f33a02c --- /dev/null +++ b/pytorch-experiments/.github/dependabot.yml @@ -0,0 +1,12 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for more information: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates +# https://containers.dev/guide/dependabot + +version: 2 +updates: + - package-ecosystem: "devcontainers" + directory: "/" + schedule: + interval: weekly diff --git a/pytorch-experiments/helloworld.py b/pytorch-experiments/helloworld.py index 0601ba3..4a25b4d 100755 --- a/pytorch-experiments/helloworld.py +++ b/pytorch-experiments/helloworld.py @@ -1,15 +1,14 @@ #!/opt/conda/bin/python import torch +import numpy def main(): # Define a tensor with "Hello, World!" string - hello_tensor = torch.tensor([72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33]) + helloworld_array = numpy.array([72, 101, 108, 108, 111, 44, 32, 87, 111, 114, 108, 100, 33]) + tensor_array = torch.from_numpy(helloworld_array) - # Convert tensor to string - hello_string = ''.join([chr(char) for char in hello_tensor]) - - print(hello_string) + print(tensor_array) if __name__ == "__main__": main() \ No newline at end of file diff --git a/pytorch-experiments/requirements.txt b/pytorch-experiments/requirements.txt index c5ddafe..a1bd174 100644 --- a/pytorch-experiments/requirements.txt +++ b/pytorch-experiments/requirements.txt @@ -1 +1,2 @@ -torch==2.2.2 +torch==2.2.1 +numpy==1.26.3 \ No newline at end of file From 07d932680fff5271ad75bdba5f268d295dc8a4ea Mon Sep 17 00:00:00 2001 From: Chris Date: Wed, 19 Mar 2025 16:50:39 -0700 Subject: [PATCH 03/11] add .gitignore to root --- .gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 .gitignore diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..38938af --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +*.secret \ No newline at end of file From 5a6378a4f18a2614d053a945a17189fba0edc164 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 20 Mar 2025 16:51:23 -0700 Subject: [PATCH 04/11] trivial change to validate keys --- Readme.md | 1 + 1 file changed, 1 insertion(+) diff --git a/Readme.md b/Readme.md index 60a17ee..af810c3 100644 --- a/Readme.md +++ b/Readme.md @@ -1,2 +1,3 @@ # Cloudops + I need a home for all those little POCs I've done but can't recall where I put them. \ No newline at end of file From 54fee814d4d84240508dd18b7fe091e4719a8320 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 20 Mar 2025 16:57:01 -0700 Subject: [PATCH 05/11] test commit --- Readme.md | 1 - 1 file changed, 1 deletion(-) diff --git a/Readme.md b/Readme.md index af810c3..60a17ee 100644 --- a/Readme.md +++ b/Readme.md @@ -1,3 +1,2 @@ # Cloudops - I need a home for all those little POCs I've done but can't recall where I put them. \ No newline at end of file From e0f17b85621c9304f58e1d926d1c2ec547bcfc55 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 23 Oct 2025 17:43:10 -0700 Subject: [PATCH 06/11] added multiarch support --- .github/workflows/build_util.yml | 11 +++++++---- utility-pod/Dockerfile | 17 ++++++++++++++--- 2 files changed, 21 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml index 01e62cd..42a9072 100644 --- a/.github/workflows/build_util.yml +++ b/.github/workflows/build_util.yml @@ -3,7 +3,7 @@ name: Build Util Container on: push: - branches: ['release'] + branches: ['release', 'multiarch'] workflow_dispatch: jobs: @@ -38,8 +38,8 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - # - name: Set up QEMU - # uses: docker/setup-qemu-action@v2 + - name: Set up QEMU + uses: docker/setup-qemu-action@v2 - name: Set up Docker Buildx uses: docker/setup-buildx-action@v2 @@ -56,6 +56,7 @@ jobs: uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.actor }}/util + tags: test-latest - name: Build and push Docker image uses: docker/build-push-action@v3 @@ -63,6 +64,7 @@ jobs: context: ./utility-pod file: ./utility-pod/Dockerfile push: true + platforms: linux/amd64,linux/arm64 tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} @@ -72,4 +74,5 @@ jobs: run: | docker images curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin - grype ghcr.io/${{ github.actor }}/util:release + grype ghcr.io/${{ github.actor }}/util:release --platform linux/amd64 + grype ghcr.io/${{ github.actor }}/util:release --platform linux/arm64 diff --git a/utility-pod/Dockerfile b/utility-pod/Dockerfile index 7baed3b..8ae913e 100644 --- a/utility-pod/Dockerfile +++ b/utility-pod/Dockerfile @@ -6,6 +6,8 @@ RUN apt-get -y update && \ apt-get -y upgrade ARG DEBIAN_FRONTEND=noninteractive +ARG TARGETPLATFORM + RUN apt-get -y install \ build-essential \ curl \ @@ -46,8 +48,12 @@ RUN mkdir /test2 && \ chgrp 0 /test2 && \ chmod g=u /test2 - -RUN curl -sfL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip && unzip awscliv2.zip -d awscliv2 && ./awscliv2/aws/install && rm awscliv2.zip +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ + curl -sfL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip ; \ + elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ + curl -sfL https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip -o awscliv2.zip ; \ + fi && \ + unzip awscliv2.zip -d awscliv2 && ./awscliv2/aws/install && rm awscliv2.zip RUN curl https://rclone.org/install.sh | bash # manually run 'rclone config' to setup the environment for each remote. @@ -56,7 +62,12 @@ RUN curl https://rclone.org/install.sh | bash RUN curl -sfL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz | tar -zxvf - -C /usr/local/bin/ # install Github CLI tool gh -RUN curl -sfL https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_amd64.tar.gz | tar -zxvf - gh_2.60.0_linux_amd64/bin/gh --strip-components=1 +RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ + curl -sfL https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_amd64.tar.gz | tar -zxvf - gh_2.60.0_linux_amd64/bin/gh --strip-components=1 \ + elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ + curl -sfL https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_arm64.tar.gz | tar -zxvf - gh_2.60.0_linux_arm64/bin/gh --strip-components=1 \ + fi + # Set the default shell on openshift to use bash rather than sh RUN /bin/sed -i 's/SHELL=\/bin\/sh/SHELL=\/bin\/bash/g' /etc/default/useradd From 51a32cf931e494368768f49a643631b4e192d5fe Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 23 Oct 2025 17:51:11 -0700 Subject: [PATCH 07/11] fixes to multiarch filename to make it more robust --- utility-pod/Dockerfile | 32 ++++++++++++++++++++++---------- 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/utility-pod/Dockerfile b/utility-pod/Dockerfile index 8ae913e..de8e0dd 100644 --- a/utility-pod/Dockerfile +++ b/utility-pod/Dockerfile @@ -48,12 +48,18 @@ RUN mkdir /test2 && \ chgrp 0 /test2 && \ chmod g=u /test2 -RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ - curl -sfL https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip -o awscliv2.zip ; \ +RUN set -eux; \ + if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ + AWS_ARCH=x86_64; \ elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ - curl -sfL https://awscli.amazonaws.com/awscli-exe-linux-aarch64.zip -o awscliv2.zip ; \ - fi && \ - unzip awscliv2.zip -d awscliv2 && ./awscliv2/aws/install && rm awscliv2.zip + AWS_ARCH=aarch64; \ + else \ + echo "Unsupported platform: $TARGETPLATFORM"; exit 1; \ + fi; \ + curl -sfL https://awscli.amazonaws.com/awscli-exe-linux-${AWS_ARCH}.zip -o awscliv2.zip; \ + unzip awscliv2.zip; \ + ./aws/install; \ + rm -rf awscliv2.zip aws RUN curl https://rclone.org/install.sh | bash # manually run 'rclone config' to setup the environment for each remote. @@ -62,12 +68,18 @@ RUN curl https://rclone.org/install.sh | bash RUN curl -sfL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz | tar -zxvf - -C /usr/local/bin/ # install Github CLI tool gh -RUN if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ - curl -sfL https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_amd64.tar.gz | tar -zxvf - gh_2.60.0_linux_amd64/bin/gh --strip-components=1 \ +RUN set -eux; \ + if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ + GH_ARCH=amd64; \ elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ - curl -sfL https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_arm64.tar.gz | tar -zxvf - gh_2.60.0_linux_arm64/bin/gh --strip-components=1 \ - fi - + GH_ARCH=arm64; \ + else \ + echo "Unsupported platform: $TARGETPLATFORM"; exit 1; \ + fi; \ + curl -sfL https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_${GH_ARCH}.tar.gz -o gh.tar.gz; \ + tar -xzf gh.tar.gz; \ + cp gh_2.60.0_linux_${GH_ARCH}/bin/gh /usr/local/bin/gh; \ + rm -rf gh.tar.gz gh_2.60.0_linux_${GH_ARCH} # Set the default shell on openshift to use bash rather than sh RUN /bin/sed -i 's/SHELL=\/bin\/sh/SHELL=\/bin\/bash/g' /etc/default/useradd From 4c5234a6afa6d2ca838475a92d56dee298beb916 Mon Sep 17 00:00:00 2001 From: Chris Date: Thu, 23 Oct 2025 18:19:04 -0700 Subject: [PATCH 08/11] debugging workflow --- .github/workflows/build_util.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml index 42a9072..e1fef20 100644 --- a/.github/workflows/build_util.yml +++ b/.github/workflows/build_util.yml @@ -23,6 +23,7 @@ jobs: scan-type: "fs" scanners: "vuln,secret,config" severity: "CRITICAL,HIGH" + ignore-policy: true # don't evaluate external cloud policies - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v2 @@ -74,5 +75,5 @@ jobs: run: | docker images curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin - grype ghcr.io/${{ github.actor }}/util:release --platform linux/amd64 - grype ghcr.io/${{ github.actor }}/util:release --platform linux/arm64 + grype ghcr.io/${{ github.actor }}/util:test-latest --platform linux/amd64 + grype ghcr.io/${{ github.actor }}/util:test-latest --platform linux/arm64 From 03a1304b0333d44ace67d6f64ddb27cbb0476fde Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 24 Oct 2025 08:30:38 -0700 Subject: [PATCH 09/11] updated versions of OCP client and switched from testing to release --- .github/workflows/build_util.yml | 13 ++++++------- utility-pod/Dockerfile | 12 ++++++++++-- 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/build_util.yml b/.github/workflows/build_util.yml index e1fef20..1656933 100644 --- a/.github/workflows/build_util.yml +++ b/.github/workflows/build_util.yml @@ -3,7 +3,7 @@ name: Build Util Container on: push: - branches: ['release', 'multiarch'] + branches: ['release'] workflow_dispatch: jobs: @@ -15,15 +15,14 @@ jobs: - uses: actions/checkout@v3 - name: Run Trivy vulnerability scanner in repo mode - uses: aquasecurity/trivy-action@0.10.0 + uses: aquasecurity/trivy-action@v2 with: format: "sarif" output: "trivy-results.sarif" ignore-unfixed: true scan-type: "fs" - scanners: "vuln,secret,config" + scanners: "vuln,secret" severity: "CRITICAL,HIGH" - ignore-policy: true # don't evaluate external cloud policies - name: Upload Trivy scan results to GitHub Security tab uses: github/codeql-action/upload-sarif@v2 @@ -57,7 +56,7 @@ jobs: uses: docker/metadata-action@v4 with: images: ghcr.io/${{ github.actor }}/util - tags: test-latest + tags: release - name: Build and push Docker image uses: docker/build-push-action@v3 @@ -75,5 +74,5 @@ jobs: run: | docker images curl -sSfL https://raw.githubusercontent.com/anchore/grype/main/install.sh | sh -s -- -b /usr/local/bin - grype ghcr.io/${{ github.actor }}/util:test-latest --platform linux/amd64 - grype ghcr.io/${{ github.actor }}/util:test-latest --platform linux/arm64 + grype ghcr.io/${{ github.actor }}/util:release --platform linux/amd64 + grype ghcr.io/${{ github.actor }}/util:release --platform linux/arm64 diff --git a/utility-pod/Dockerfile b/utility-pod/Dockerfile index de8e0dd..2f3061a 100644 --- a/utility-pod/Dockerfile +++ b/utility-pod/Dockerfile @@ -65,7 +65,15 @@ RUN curl https://rclone.org/install.sh | bash # manually run 'rclone config' to setup the environment for each remote. # install Openshift CLI tool oc -RUN curl -sfL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux.tar.gz | tar -zxvf - -C /usr/local/bin/ +RUN set -eux; \ + if [ "$TARGETPLATFORM" = "linux/amd64" ]; then \ + OCP_ARCH=""; \ + elif [ "$TARGETPLATFORM" = "linux/arm64" ]; then \ + OCP_ARCH="-arm64"; \ + else \ + echo "Unsupported platform: $TARGETPLATFORM"; exit 1; \ + fi; \ + curl -sfL https://mirror.openshift.com/pub/openshift-v4/clients/ocp/stable/openshift-client-linux${OCP_ARCH}.tar.gz | tar -zxvf - -C /usr/local/bin/ # install Github CLI tool gh RUN set -eux; \ @@ -76,7 +84,7 @@ RUN set -eux; \ else \ echo "Unsupported platform: $TARGETPLATFORM"; exit 1; \ fi; \ - curl -sfL https://github.com/cli/cli/releases/download/v2.60.0/gh_2.60.0_linux_${GH_ARCH}.tar.gz -o gh.tar.gz; \ + curl -sfL https://github.com/cli/cli/releases/download/v2.82.1/gh_2.60.0_linux_${GH_ARCH}.tar.gz -o gh.tar.gz; \ tar -xzf gh.tar.gz; \ cp gh_2.60.0_linux_${GH_ARCH}/bin/gh /usr/local/bin/gh; \ rm -rf gh.tar.gz gh_2.60.0_linux_${GH_ARCH} From 2bb6665d256d1875779b3af1acbba00064c2bdfd Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 24 Oct 2025 08:34:38 -0700 Subject: [PATCH 10/11] fixed error in GH version download --- utility-pod/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utility-pod/Dockerfile b/utility-pod/Dockerfile index 2f3061a..3d1379a 100644 --- a/utility-pod/Dockerfile +++ b/utility-pod/Dockerfile @@ -84,7 +84,7 @@ RUN set -eux; \ else \ echo "Unsupported platform: $TARGETPLATFORM"; exit 1; \ fi; \ - curl -sfL https://github.com/cli/cli/releases/download/v2.82.1/gh_2.60.0_linux_${GH_ARCH}.tar.gz -o gh.tar.gz; \ + curl -sfL https://github.com/cli/cli/releases/download/v2.82.1/gh_2.82.1_linux_${GH_ARCH}.tar.gz -o gh.tar.gz; \ tar -xzf gh.tar.gz; \ cp gh_2.60.0_linux_${GH_ARCH}/bin/gh /usr/local/bin/gh; \ rm -rf gh.tar.gz gh_2.60.0_linux_${GH_ARCH} From d4e60a9d2bd17e6faeaccab5c75ed908192ab540 Mon Sep 17 00:00:00 2001 From: Chris Date: Fri, 24 Oct 2025 08:49:08 -0700 Subject: [PATCH 11/11] fixed version issues with GH CLI --- utility-pod/Dockerfile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/utility-pod/Dockerfile b/utility-pod/Dockerfile index 3d1379a..435b9bd 100644 --- a/utility-pod/Dockerfile +++ b/utility-pod/Dockerfile @@ -8,6 +8,8 @@ RUN apt-get -y update && \ ARG DEBIAN_FRONTEND=noninteractive ARG TARGETPLATFORM +GH_VERSION="2.82.1"; \ + RUN apt-get -y install \ build-essential \ curl \ @@ -84,10 +86,10 @@ RUN set -eux; \ else \ echo "Unsupported platform: $TARGETPLATFORM"; exit 1; \ fi; \ - curl -sfL https://github.com/cli/cli/releases/download/v2.82.1/gh_2.82.1_linux_${GH_ARCH}.tar.gz -o gh.tar.gz; \ + curl -sfL https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${GH_ARCH}.tar.gz -o gh.tar.gz; \ tar -xzf gh.tar.gz; \ - cp gh_2.60.0_linux_${GH_ARCH}/bin/gh /usr/local/bin/gh; \ - rm -rf gh.tar.gz gh_2.60.0_linux_${GH_ARCH} + cp gh_${GH_VERSION}_linux_${GH_ARCH}/bin/gh /usr/local/bin/gh; \ + rm -rf gh.tar.gz gh_${GH_VERSION}_linux_${GH_ARCH} # Set the default shell on openshift to use bash rather than sh RUN /bin/sed -i 's/SHELL=\/bin\/sh/SHELL=\/bin\/bash/g' /etc/default/useradd