-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
010171d
commit 28c72f0
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
FROM python:3.8-alpine3.10 | ||
|
||
ARG APP_VERSION=1.0 | ||
|
||
# https://github.com/kubernetes/kubectl/releases | ||
ARG KUBECTL_VERSION=1.16.2 | ||
|
||
# https://github.com/instrumenta/kubeval/releases | ||
ARG KUBEVAL_VERSION=0.14.0 | ||
|
||
# https://pypi.org/project/yamllint/ | ||
ARG YAMLLINT_VERSION=1.18.0 | ||
|
||
# https://github.com/kubernetes-sigs/kustomize/releases | ||
ARG KUSTOMIZE_VERSION=3.3.0 | ||
|
||
# split layers into distinct components | ||
RUN apk add --no-cache ca-certificates curl | ||
|
||
# Install Kubeval | ||
RUN mkdir /tmp/kubeval \ | ||
&& curl -L -o /tmp/kubeval/kubeval.tar.gz \ | ||
https://github.com/instrumenta/kubeval/releases/download/${KUBEVAL_VERSION}/kubeval-linux-amd64.tar.gz \ | ||
&& tar xf /tmp/kubeval/kubeval.tar.gz -C /tmp/kubeval \ | ||
&& mv /tmp/kubeval/kubeval /usr/local/bin \ | ||
&& chmod +x /usr/local/bin/kubeval \ | ||
&& rm -rf /tmp/kubeval | ||
|
||
# Install yamllint | ||
RUN pip install yamllint==${YAMLLINT_VERSION} && \ | ||
rm -rf ~/.cache/pip | ||
|
||
# Install Kustomize | ||
RUN mkdir /tmp/kustomize \ | ||
&& curl -L -o /tmp/kustomize/kustomize.tar.gz \ | ||
https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv${KUSTOMIZE_VERSION}/kustomize_v${KUSTOMIZE_VERSION}_linux_amd64.tar.gz \ | ||
&& tar xf /tmp/kustomize/kustomize.tar.gz -C /tmp/kustomize \ | ||
&& mv /tmp/kustomize/kustomize /usr/local/bin \ | ||
&& chmod +x /usr/local/bin/kustomize \ | ||
&& rm -rf /tmp/kustomize | ||
|
||
# Install Kubectl | ||
RUN curl -o /usr/local/bin/kubectl https://storage.googleapis.com/kubernetes-release/release/v${KUBECTL_VERSION}/bin/linux/amd64/kubectl \ | ||
&& chmod +x /usr/local/bin/kubectl | ||
|
||
CMD ["/bin/sh"] | ||
|