Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated kubectl & cleaned up Dockerfile #12

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"