Skip to content

Commit

Permalink
Add some helm plugins, add gosu and fix install of skopeo
Browse files Browse the repository at this point in the history
  • Loading branch information
trnubo committed May 26, 2023
1 parent d768c59 commit cc4ce32
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 12 deletions.
18 changes: 7 additions & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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/* \
;
Expand Down Expand Up @@ -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 \
Expand All @@ -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 \
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
17 changes: 17 additions & 0 deletions install-helm-plugins.sh
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit cc4ce32

Please sign in to comment.