Skip to content

Commit

Permalink
Removes unneeded files
Browse files Browse the repository at this point in the history
  • Loading branch information
Blaize Kaye committed Jul 26, 2024
1 parent 7d874a3 commit 384e920
Showing 1 changed file with 9 additions and 20 deletions.
29 changes: 9 additions & 20 deletions insights-scanner/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ FROM ${UPSTREAM_REPO:-uselagoon}/commons:${UPSTREAM_TAG:-latest} as commons
FROM docker:20.10.24

LABEL org.opencontainers.image.authors="The Lagoon Authors" maintainer="The Lagoon Authors"
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-images" repository="https://github.com/uselagoon/lagoon-images"

ENV LAGOON=build-deploy-image
LABEL org.opencontainers.image.source="https://github.com/uselagoon/lagoon-service-images" repository="https://github.com/uselagoon/lagoon-service-images"

ENV LAGOON=insights-scanner

# Copy commons files
COPY --from=commons /lagoon /lagoon
Expand All @@ -29,28 +28,15 @@ ENV TMPDIR=/tmp \
BASH_ENV=/home/.bashrc

# Defining Versions
ENV KUBECTL_VERSION=v1.27.6 \
HELM_VERSION=v3.13.0 \
HELM_SHA256=138676351483e61d12dfade70da6c03d471bbdcac84eaadeb5e1d06fa114a24f
ENV KUBECTL_VERSION=v1.27.6

RUN apk add -U --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing aufs-util \
&& apk upgrade --no-cache openssh openssh-keygen openssh-client-common openssh-client-default \
&& apk add --no-cache openssl curl jq parallel bash git py-pip skopeo \
&& apk add --no-cache openssl curl parallel bash git py-pip skopeo \
&& git config --global user.email "lagoon@lagoon.io" && git config --global user.name lagoon \
&& pip install shyaml yq \
&& pip install shyaml \
&& curl -Lo /usr/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/${KUBECTL_VERSION}/bin/linux/amd64/kubectl \
&& chmod +x /usr/bin/kubectl \
&& curl -Lo /usr/bin/yq3 https://github.com/mikefarah/yq/releases/download/3.3.2/yq_linux_amd64 \
&& chmod +x /usr/bin/yq3 \
&& curl -Lo /usr/bin/yq https://github.com/mikefarah/yq/releases/download/v4.35.2/yq_linux_amd64 \
&& chmod +x /usr/bin/yq \
&& curl -Lo /tmp/helm.tar.gz https://get.helm.sh/helm-${HELM_VERSION}-linux-amd64.tar.gz \
&& echo "${HELM_SHA256} /tmp/helm.tar.gz" | sha256sum -c - \
&& mkdir /tmp/helm \
&& tar -xzf /tmp/helm.tar.gz -C /tmp/helm --strip-components=1 \
&& mv /tmp/helm/helm /usr/bin/helm \
&& chmod +x /usr/bin/helm \
&& rm -rf /tmp/helm*
&& chmod +x /usr/bin/kubectl

RUN curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin v0.52.2

Expand All @@ -61,5 +47,8 @@ COPY ./*.sh /app

RUN chmod +x /app/run.sh && /bin/fix-permissions /app/run.sh

# We'll set DOCKER_HOST to the lagoon default, but with the assumption that it's overridable at runtime by insights-handler
ENV DOCKER_HOST=docker-host.lagoon.svc

ENTRYPOINT ["/sbin/tini", "--", "/lagoon/entrypoints.sh"]
CMD ["/app/run.sh"]

0 comments on commit 384e920

Please sign in to comment.