diff --git a/Dockerfile b/Dockerfile index 14a3bd8..fd6b6cb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ ENV LANG=C.UTF-8 LC_ALL=C.UTF-8 # Install base packages RUN set -x \ && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y wget curl ca-certificates vim jq openssh-client uuid-runtime procps gnupg2 dirmngr db-util libpam-modules libpam0g libpam0g-dev git make lsb-release \ + && apt-get install --no-install-recommends --no-install-suggests -y wget curl ca-certificates vim jq openssh-client uuid-runtime procps gnupg2 dirmngr db-util libpam-modules libpam0g libpam0g-dev git make lsb-release gosu skopeo \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* \ ; @@ -102,16 +102,6 @@ RUN set -x \ && rm -rf /var/lib/apt/lists/* \ ; -# Install skopeo -RUN set -x \ - && echo 'deb http://download.opensuse.org/repositories/devel:/kubic:/libcontainers:/stable/Debian_11/ /' > /etc/apt/sources.list.d/devel:kubic:libcontainers:stable.list \ - && wget -nv https://download.opensuse.org/repositories/devel:kubic:libcontainers:stable/Debian_11/Release.key -O- | apt-key add - \ - && apt-get update \ - && apt-get install --no-install-recommends --no-install-suggests -y skopeo \ - && apt-get clean \ - && rm -rf /var/lib/apt/lists/* \ - ; - # Install apprise github.com/caronc/apprise RUN set -x \ && apt-get update \ @@ -132,6 +122,12 @@ RUN set -x \ && /install-tools.sh \ ; +# Download helm plugins +# Set HELM_PLUGINS since we can't install these in /home/rundeck since it is normally mounted into the container +COPY install-helm-plugins.sh / +RUN gosu rundeck /install-helm-plugins.sh +ENV HELM_PLUGINS="/var/lib/rundeck/.local/share/helm/plugins" + ENV PATH=/usr/local/sbin:/usr/local/bin:/opt/bin:/usr/sbin:/usr/bin:/sbin:/bin RUN set -x \ diff --git a/Makefile b/Makefile index 6533bc4..130f793 100644 --- a/Makefile +++ b/Makefile @@ -18,7 +18,7 @@ build-dev: docker build --pull -t ${IMAGE_NAME}:${TAG} . bash: - docker run --rm -it --name rundeck -p 4440:4440 $(DOCKER_VOLUMES) --entrypoint /bin/bash ${IMAGE_NAME}:${TAG} + docker run --rm -it --name rundeck -p 4440:4440 $(DOCKER_VOLUMES) --entrypoint /bin/bash ${REGISTRY}/${IMAGE_NAME}:${TAG} run: docker run --rm -it --name rundeck -p 4440:4440 $(DOCKER_VOLUMES) ${IMAGE_NAME}:${TAG} diff --git a/install-helm-plugins.sh b/install-helm-plugins.sh new file mode 100755 index 0000000..4b874ea --- /dev/null +++ b/install-helm-plugins.sh @@ -0,0 +1,17 @@ +#!/usr/bin/env bash + +set -euo pipefail +IFS=$'\n\t' + +helm_version="3.9" + +export PATH=/opt/helm-${helm_version}/bin:$HOME/bin:$PATH + +# plugins_dir="$(helm env | sed -E -e '/HELM_PLUGINS/!d' -e 's/^[^=]+="(.*)"$/\1/')" + +set -x + +helm env + +helm plugin install https://github.com/databus23/helm-diff --version 3.8.0 +helm plugin install https://github.com/jkroepke/helm-secrets --version 4.4.2