Skip to content

Commit 89e6069

Browse files
committed
Updated kubectl & cleaned up Dockerfile
1 parent 373180e commit 89e6069

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

Dockerfile

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,19 @@
1-
FROM ubuntu:16.04
2-
LABEL maintainer="OpenEBS"
3-
RUN apt-get update || true \
4-
&& apt-get install -y curl
5-
ENV KUBE_LATEST_VERSION="v1.15.3"
6-
RUN curl -L https://storage.googleapis.com/kubernetes-release/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl -o /usr/local/bin/kubectl \
7-
&& chmod +x /usr/local/bin/kubectl
1+
FROM ubuntu:22.04 AS build
2+
RUN apt-get update \
3+
&& apt-get install -y curl \
4+
&& rm -rf /var/lib/apt/lists/*
5+
6+
ARG KUBE_LATEST_VERSION="v1.25.2"
7+
RUN cd /root \
8+
&& curl -LO https://dl.k8s.io/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl \
9+
&& curl -LO https://dl.k8s.io/release/${KUBE_LATEST_VERSION}/bin/linux/amd64/kubectl.sha256 \
10+
&& echo "$(cat kubectl.sha256) kubectl" | sha256sum --check \
11+
&& chmod -v +x kubectl
12+
13+
FROM ubuntu:22.04 AS final
14+
15+
COPY --from=build /root/kubectl /usr/local/bin/kubectl
816
COPY textfile_collector.sh /
17+
18+
ENTRYPOINT ["/textfile_collector.sh"]
19+
LABEL maintainer="OpenEBS"

0 commit comments

Comments
 (0)