From 3650aef9fe252526a1053ce23c38c7d0ed645b76 Mon Sep 17 00:00:00 2001 From: stanislaw_jakiel Date: Fri, 22 Dec 2023 19:20:01 +0100 Subject: [PATCH] auto-publish wip --- .github/workflows/build-images.yaml | 12 ++++++++---- dockerfiles/deb-utils/Dockerfile | 11 +++++++++-- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build-images.yaml b/.github/workflows/build-images.yaml index ac7805d..c549113 100644 --- a/.github/workflows/build-images.yaml +++ b/.github/workflows/build-images.yaml @@ -4,7 +4,7 @@ on: push: branches: - master -# paths: +# paths: # fixme setup ghcr # - 'dockerfiles/deb-utils/**' env: @@ -12,18 +12,22 @@ env: IMAGE_NAME: ${{ github.repository }} jobs: - images: + build-and-publish-images: strategy: matrix: image: ["deb-utils"] + name: Build images + runs-on: ubuntu-latest + permissions: contents: read packages: write + steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Log in to the Container registry uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1 with: @@ -34,7 +38,7 @@ jobs: id: meta uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7 with: - images: ${{ env.REGISTRY }}/utils/${{ env.IMAGE_NAME }} + images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} - name: Build and push Docker image uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4 with: diff --git a/dockerfiles/deb-utils/Dockerfile b/dockerfiles/deb-utils/Dockerfile index 1e47815..b9b675a 100644 --- a/dockerfiles/deb-utils/Dockerfile +++ b/dockerfiles/deb-utils/Dockerfile @@ -1,7 +1,14 @@ FROM debian:bookworm-slim RUN apt-get update && \ - apt-get install -y iproute2 dnsutils netcat-openbsd iputils-ping iperf3 curl traceroute iptables tcpdump && \ - rm -rf /var/lib/apt/lists/* + apt-get install -y iproute2 dnsutils netcat-openbsd iputils-ping iperf3 curl traceroute iptables tcpdump stress-ng sysstat vim gnupg2 apt-transport-https ca-certificates + +RUN curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.28/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg &&\ + curl https://packages.cloud.google.com/apt/doc/apt-key.gpg | tee /usr/share/keyrings/cloud.google.asc &&\ + echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.28/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list &&\ + echo "deb [signed-by=/usr/share/keyrings/cloud.google.asc] https://packages.cloud.google.com/apt cloud-sdk main" | tee -a /etc/apt/sources.list.d/google-cloud-sdk.list &&\ + apt-get update && apt-get install -y kubectl google-cloud-cli google-cloud-sdk-gke-gcloud-auth-plugin + +RUN rm -rf /var/lib/apt/lists/* ENTRYPOINT [ "/bin/bash" ]