Files
containers/bitnami/kubectl/1.24/debian-10/Dockerfile
Vasek - Tom C 072c4967f0 feat(Dockerfile): install git toolchain in bitnami/kubectl (#43)
`kubectl` binary also include `kustomize` to build configurable
manifest.
`kubectl kustomize` supports three options: "no flag", "directory" and
"url".

The official documentation show the following example:
```
kubectl kustomize "https://github.com/kubernetes-sigs/kustomize.git/exam
ples/helloWorld?ref=v1.0.6"
```

But it does not work with `bitnami/kubectl:latest`

```
docker run --rm bitnami/kubectl:latest kustomize "https://github.com/
kubernetes-sigs/kustomize.git/examples/helloWorld?ref=v1.0.6"
error: no 'git' program on path: exec: "git": executable file not found
in $PATH
```

The problem is that it requires `git` to pull the repository and
execute it.
This commit include `git-all` in the installed package to solve this
issue.

Signed-off-by: Vasek - Tom C <tom.chauveau@epitech.eu>
2022-05-31 02:08:00 +00:00

28 lines
1.2 KiB
Docker

FROM docker.io/bitnami/minideb:buster
LABEL maintainer "Bitnami <containers@bitnami.com>"
ENV HOME="/" \
OS_ARCH="amd64" \
OS_FLAVOUR="debian-10" \
OS_NAME="linux"
COPY prebuildfs /
# Install required system packages and dependencies
RUN install_packages ca-certificates curl git gzip jq procps tar wget
RUN wget -nc -P /tmp/bitnami/pkg/cache/ https://downloads.bitnami.com/files/stacksmith/kubectl-1.24.1-0-linux-amd64-debian-10.tar.gz && \
echo "4ba3a313032c744b7d62e589e48922049b1e7d5b00e02e6ab3e380b467e1fd0b /tmp/bitnami/pkg/cache/kubectl-1.24.1-0-linux-amd64-debian-10.tar.gz" | sha256sum -c - && \
tar -zxf /tmp/bitnami/pkg/cache/kubectl-1.24.1-0-linux-amd64-debian-10.tar.gz -P --transform 's|^[^/]*/files|/opt/bitnami|' --wildcards '*/files' && \
rm -rf /tmp/bitnami/pkg/cache/kubectl-1.24.1-0-linux-amd64-debian-10.tar.gz
RUN apt-get update && apt-get upgrade -y && \
rm -r /var/lib/apt/lists /var/cache/apt/archives
RUN chmod g+rwX /opt/bitnami
RUN mkdir /.kube && chmod g+rwX /.kube
ENV APP_VERSION="1.24.1" \
BITNAMI_APP_NAME="kubectl" \
PATH="/opt/bitnami/kubectl/bin:$PATH"
USER 1001
ENTRYPOINT [ "kubectl" ]
CMD [ "--help" ]