Skip to content

Commit

Permalink
auto-publish wip
Browse files Browse the repository at this point in the history
  • Loading branch information
kiemlicz committed Dec 22, 2023
1 parent 419448a commit 3650aef
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/build-images.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,26 +4,30 @@ on:
push:
branches:
- master
# paths:
# paths: # fixme setup ghcr
# - 'dockerfiles/deb-utils/**'

env:
REGISTRY: ghcr.io
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:
Expand All @@ -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:
Expand Down
11 changes: 9 additions & 2 deletions dockerfiles/deb-utils/Dockerfile
Original file line number Diff line number Diff line change
@@ -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" ]

0 comments on commit 3650aef

Please sign in to comment.