Improve dockerfile
This way the layer cache will work, while properly detecting new kubectl releases
This commit is contained in:
parent
5955def4b8
commit
b0ee0172be
1 changed files with 2 additions and 1 deletions
|
|
@ -2,8 +2,9 @@ FROM python:3.10
|
||||||
|
|
||||||
LABEL maintainer="Stéphane Bidoul"
|
LABEL maintainer="Stéphane Bidoul"
|
||||||
|
|
||||||
|
ADD https://dl.k8s.io/release/stable.txt /tmp/kubectl-version.txt
|
||||||
RUN curl -L \
|
RUN curl -L \
|
||||||
"https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/amd64/kubectl" \
|
"https://dl.k8s.io/release/$(cat /tmp/kubectl-version.txt)/bin/linux/amd64/kubectl" \
|
||||||
-o /usr/local/bin/kubectl \
|
-o /usr/local/bin/kubectl \
|
||||||
&& chmod +x /usr/local/bin/kubectl
|
&& chmod +x /usr/local/bin/kubectl
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue