From fa2fd22b85b7ca3477d77bea6047172ef1d734d0 Mon Sep 17 00:00:00 2001 From: ange Date: Fri, 10 May 2024 12:01:12 +0200 Subject: [PATCH] feat: remove kubectl from base image --- .gitea/workflows/build.yaml | 3 --- debian/Dockerfile | 13 ++----------- 2 files changed, 2 insertions(+), 14 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 39070ea..c4264eb 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -1,10 +1,7 @@ -name: test - on: push jobs: build: - name: test runs-on: debian steps: - uses: actions/checkout@v1 diff --git a/debian/Dockerfile b/debian/Dockerfile index 0b169e1..9a76701 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,13 +1,3 @@ -FROM debian:12-slim as kubectl -RUN apt-get update && apt-get install -y --no-install-recommends \ - ca-certificates \ - curl \ - git \ - && rm -rf /var/lib/apt/lists/* -ENV K8S_VERSION=v1.27 -RUN V="$(git ls-remote --tags --refs --sort=version:refname https://github.com/kubernetes/kubernetes "$K8S_VERSION.*" | awk -F/ 'END{print $NF}')" \ - && curl -Lo /kubectl "https://dl.k8s.io/release/$V/bin/linux/amd64/kubectl" - FROM debian:12-slim ENV DEBIAN_FRONTEND=noninteractive RUN apt-get update && apt-get install -y --no-install-recommends \ @@ -16,4 +6,5 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ git \ jq \ && rm -rf /var/lib/apt/lists/* -COPY --from=kubectl --chmod=0755 /kubectl /usr/local/bin/ +RUN useradd -m app +USER app