Skip to content
Snippets Groups Projects
Commit dc5dab09c3b4 authored by Carine Dengler's avatar Carine Dengler
Browse files

feat: add kubectl and kubectl-kustomize images

parent c1c6da08b079
No related branches found
No related tags found
No related merge requests found
Pipeline #81809 passed
...@@ -10,6 +10,28 @@ ...@@ -10,6 +10,28 @@
--dockerfile $CI_PROJECT_DIR/library/buster-slim-pg11/Dockerfile --dockerfile $CI_PROJECT_DIR/library/buster-slim-pg11/Dockerfile
--destination $CI_REGISTRY_IMAGE/buster-slim-pg11 --destination $CI_REGISTRY_IMAGE/buster-slim-pg11
build_kubectl-kustomize:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor
--context $CI_PROJECT_DIR/library/kubectl-kustomize
--dockerfile $CI_PROJECT_DIR/library/kubectl-kustomize/Dockerfile
--destination $CI_REGISTRY_IMAGE/kubectl-kustomize
build_kubectl:
image:
name: gcr.io/kaniko-project/executor:debug
entrypoint: [""]
script:
- echo "{\"auths\":{\"$CI_REGISTRY\":{\"username\":\"$CI_REGISTRY_USER\",\"password\":\"$CI_REGISTRY_PASSWORD\"}}}" > /kaniko/.docker/config.json
- /kaniko/executor
--context $CI_PROJECT_DIR/library/kubectl
--dockerfile $CI_PROJECT_DIR/library/kubectl/Dockerfile
--destination $CI_REGISTRY_IMAGE/kubectl
build_python-logilab: build_python-logilab:
image: image:
name: gcr.io/kaniko-project/executor:debug name: gcr.io/kaniko-project/executor:debug
......
FROM alpine:latest
# install requirements
RUN apk add -U curl gettext
# install kustomize
WORKDIR /usr/local/bin
RUN wget https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv3.8.7/checksums.txt
RUN wget https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv3.8.7/kustomize_v3.8.7_linux_amd64.tar.gz
RUN $(sha256sum -c checksums.txt | grep kustomize_v3.8.7_linux_amd64.tar.gz | grep -q OK)
RUN tar -xf kustomize_v3.8.7_linux_amd64.tar.gz
# install kubectl
RUN curl -o /usr/bin/kubectl -LO https://storage.googleapis.com/kubernetes-release/release/v1.20.8/bin/linux/amd64/kubectl && \
chmod +x /usr/bin/kubectl && \
kubectl version --client
ENTRYPOINT []
CMD []
FROM alpine:latest
# Install requirements
RUN apk add -U curl gettext
# Install kubectl
RUN curl -o /usr/bin/kubectl -LO https://storage.googleapis.com/kubernetes-release/release/v1.20.8/bin/linux/amd64/kubectl && \
chmod +x /usr/bin/kubectl && \
kubectl version --client
ENTRYPOINT []
CMD []
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment