Skip to content

Commit

Permalink
Updated kubectl & cleaned up Dockerfile
Browse files Browse the repository at this point in the history
Signed-off-by: Kalle Fagerberg <kalle.fagerberg@riskident.com>
  • Loading branch information
applejag committed Oct 6, 2022
1 parent 373180e commit 5643b44
Showing 1 changed file with 18 additions and 7 deletions.
25 changes: 18 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
FROM ubuntu:16.04
LABEL maintainer="OpenEBS"
RUN apt-get update || true \
&& apt-get install -y curl
ENV KUBE_LATEST_VERSION="v1.15.3"
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \
&& chmod +x /usr/local/bin/kubectl
FROM ubuntu:22.04 AS build
RUN apt-get update \
&& apt-get install -y curl \
&& rm -rf /var/lib/apt/lists/*

ARG KUBE_LATEST_VERSION="v1.25.2"
RUN cd /root \
&& curl -LO https://dl.k8s.io/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl \
&& curl -LO https://dl.k8s.io/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl.sha256 \
&& echo "$(cat kubectl.sha256) kubectl" | sha256sum --check \
&& chmod -v +x kubectl

FROM ubuntu:22.04 AS final

COPY --from=build /root/kubectl /usr/local/bin/kubectl
COPY textfile_collector.sh /

ENTRYPOINT ["/textfile_collector.sh"]
LABEL maintainer="OpenEBS"

0 comments on commit 5643b44

Please sign in to comment.