Skip to content

Commit

Permalink
feat: add kube-linter binary (#209)
Browse files Browse the repository at this point in the history
  • Loading branch information
Monska85 authored Oct 16, 2024
1 parent dac247e commit ffe714f
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
# Define the google cloud sdk image tag to use.
ARG GOOGLE_CLOUD_CLI_IMAGE_TAG=497.0.0-alpine

# Build go binaries
FROM golang:1.23.0-alpine3.20 AS gobinaries

# https://github.com/stackrox/kube-linter
ENV KUBELINTER_VERSION=0.6.8
RUN apk --no-cache add git \
&& go install golang.stackrox.io/kube-linter/cmd/kube-linter@v${KUBELINTER_VERSION}

FROM eu.gcr.io/google.com/cloudsdktool/google-cloud-cli:${GOOGLE_CLOUD_CLI_IMAGE_TAG}

# https://github.com/docker/compose/releases
Expand Down Expand Up @@ -64,6 +72,10 @@ RUN pip install --no-cache-dir awscli==${AWS_CLI_VERSION} --break-system-package

RUN echo "source /google-cloud-sdk/path.bash.inc" >> /etc/profile

# Install kube-linter copying the binary from the gobinaries stage
COPY --from=gobinaries /go/bin/kube-linter /usr/local/bin/kube-linter
RUN chmod +x /usr/local/bin/kube-linter

COPY configs /configs

COPY docker-entrypoint.sh /usr/local/bin/
Expand Down

0 comments on commit ffe714f

Please sign in to comment.