This docker image is based on the standard Alpine image with additional k3s installed. This way it's easy to use it as a gitlab runner task to be able to dockers and manifest by using k3s in your (Gitlab) pipeline.
user@server:~/repos/alpine-curl-kubectl$ cat Dockerfile.amd64
FROM alpine:latest
RUN apk add --no-cache --update curl
RUN VERSION=$(curl -w "%{url_effective}" -I -L -s -S https://github.com/rancher/k3s/releases/latest -o /dev/null | sed -e "s|.*/||") \
BINURL=https://github.com/rancher/k3s/releases/download/${VERSION}/k3s \
&& curl -o /usr/local/bin/k3s -sfL $BINURL \
&& chmod 755 /usr/local/bin/k3s \
&& ln -s /usr/local/bin/k3s /usr/local/bin/kubectl
RUN apk del curl
tb_k8s:
stage: test_build
image: djieno/alpine-k3s:amd64
tags:
- kubernetes
script:
- kubectl --kubeconfig ./kubeconfig.yaml get node
- echo "some test"
Content type
Image
Digest
Size
28.4 MB
Last updated
over 7 years ago
docker pull djieno/alpine-k3s:amd64