diff --git a/README.md b/README.md index 9766bbe..19be4b9 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,10 @@ # Base Image for Kubernetes Administration +## Build Image + +`docker-compose -f dist/alpine/docker-compose.yml --env-file \ + config/example.env build --no-cache` + ## Launch locally @@ -8,4 +13,4 @@ ## Notes -https://hub.docker.com/r/vathes/k8s-admin \ No newline at end of file +https://hub.docker.com/r/vathes/k8s-admin diff --git a/config/example.env b/config/example.env index 292febe..9bdd613 100644 --- a/config/example.env +++ b/config/example.env @@ -1,5 +1,2 @@ -# KOPS_VERSION=1.14.0-beta.2 -# HELM_VERSION=v2.14.1 - -KOPS_VERSION=v1.18.0 -HELM_VERSION=v3.3.0 \ No newline at end of file +KOPS_VERSION=v1.21.1 +HELM_VERSION=v3.7.0 diff --git a/dist/alpine/Dockerfile b/dist/alpine/Dockerfile index 364078d..259b0fb 100644 --- a/dist/alpine/Dockerfile +++ b/dist/alpine/Dockerfile @@ -2,16 +2,15 @@ FROM python:3.8-alpine3.12 as k8s_build ARG KOPS_VERSION ARG HELM_VERSION RUN \ - mkdir /main && \ + set -x; > /etc/inittab && mkdir /main && \ apk update && \ # export functions, for download, json parsing, ssh keygen, api keygen - apk add --no-cache bash curl jq openssh openssl && \ + apk add --no-cache bash curl jq openssh openssl util-linux bind-tools && \ # for aws cli, yaml parsing pip install awscli --upgrade --user --no-cache-dir && \ - # YQ (last verified was 3.4.0) - curl -L $(echo "https://github.com/mikefarah/yq/releases/download/\ - $(curl https://api.github.com/repos/mikefarah/yq/releases/latest | jq -r '.tag_name')/\ - yq_linux_amd64" | tr -d '\n' | tr -d '\t') -o /usr/local/bin/yq && \ + # YQ (v4 needs migration) + curl -L "https://github.com/mikefarah/yq/releases/download/3.4.1/yq_linux_amd64" \ + -o /usr/local/bin/yq && \ chmod +x /usr/local/bin/yq && \ # KOPS curl -L $(echo "https://github.com/kubernetes/kops/releases/download/${KOPS_VERSION}\ @@ -54,4 +53,4 @@ ENV PATH "/root/.local/bin:$PATH" WORKDIR /main VOLUME /main SHELL ["/bin/bash", "-lc"] -CMD ["/bin/bash"] \ No newline at end of file +CMD ["/bin/bash"] diff --git a/dist/alpine/docker-compose.yml b/dist/alpine/docker-compose.yml index 1182ed1..46a4c80 100644 --- a/dist/alpine/docker-compose.yml +++ b/dist/alpine/docker-compose.yml @@ -15,4 +15,4 @@ services: echo "$$0 running..."; echo "PATH: '$$PATH'"; tail -f /dev/null; - \ No newline at end of file +