diff --git a/Dockerfile b/Dockerfile index 52de95b..3b20fe1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -13,17 +13,35 @@ ARG PYTHON_VERSION RUN apk add --update \ linux-headers \ git \ - python3 && \ + gcc \ + build-base \ + libc-dev \ + musl-dev \ + python3-dev \ + python3 \ + libffi-dev && \ rm -rf /var/cache/apk/* # Install helmfile plugin deps - -RUN helm plugin install https://github.com/databus23/helm-diff --version ${HELM_DIFF_VERSION} && \ - helm plugin install https://github.com/futuresimple/helm-secrets --version ${HELM_SECRETS_VERSION} +RUN helm plugin uninstall diff +RUN helm plugin install https://github.com/databus23/helm-diff --version ${HELM_DIFF_VERSION} +RUN helm plugin install https://github.com/futuresimple/helm-secrets --version ${HELM_SECRETS_VERSION} +# I have no idea why but that is need otherwise +# diff and secrets plugin don't work +RUN rm -rf /root/.helm/helm/plugins/https-github.com-databus23-helm-diff /root/.helm/helm/plugins/https-github.com-futuresimple-helm-secrets + +# Install python library +RUN python3 -m pip install --upgrade pip +RUN python3 -m pip install ruamel.yaml +RUN python3 -m pip install azure-cli # Install helmfile +ADD https://github.com/helmfile/helmfile/releases/download/v${HELMFILE_VERSION}/helmfile_${HELMFILE_VERSION}_linux_amd64.tar.gz /tmp/helmfile.tar.gz +RUN tar xzf /tmp/helmfile.tar.gz -C /tmp && \ + mv /tmp/helmfile /bin/helmfile && \ + rm -rf /tmp/helmfile.tar.gz -ADD https://github.com/roboll/helmfile/releases/download/v${HELMFILE_VERSION}/helmfile_linux_amd64 /bin/helmfile +# Set permissions for helmfile binary RUN chmod 0755 /bin/helmfile LABEL helm="${HELM_VERSION}" @@ -32,4 +50,4 @@ LABEL helmdiff="${HELM_DIFF_VERSION}" COPY lib/helmfile.py /helmfile.py -ENTRYPOINT ["python3", "/helmfile.py"] \ No newline at end of file +ENTRYPOINT ["python3", "/helmfile.py"]