Skip to content

Commit

Permalink
Merge pull request #42 from deftdevs/helmfile-ubuntu-24.04
Browse files Browse the repository at this point in the history
Helmfile: Install packages for Ubuntu 24.04, add Podman
  • Loading branch information
pathob authored Sep 13, 2024
2 parents c4788e8 + af4c9e0 commit a1e78c3
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 16 deletions.
9 changes: 9 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,3 +109,12 @@ jobs:
- name: Inspect image
run: |
docker image inspect ghcr.io/${{ github.repository_owner }}/${{ matrix.image }}:${{ matrix.version }}
## This job is used to aggregate the result of the 'build' matrix job.
## There doesn't seem to be another way to have status checks based on "dynamic" matrix jobs.
build_success:
needs: [ build ]
runs-on: ubuntu-22.04
steps:
- name: Build success
run: echo "Build success"
45 changes: 33 additions & 12 deletions helmfile/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,45 +1,66 @@
FROM ghcr.io/helmfile/helmfile-ubuntu:v0.168.0

LABEL org.opencontainers.image.source https://github.com/deftdevs/containers
LABEL org.opencontainers.image.source=https://github.com/deftdevs/containers

## Run noninteractive
ARG DEBIAN_FRONTEND=noninteractive

## Install prerequisites
RUN apt-get update && \
apt-get --no-install-recommends --yes install \
apt-transport-https \
ca-certificates \
curl \
gnupg \
lsb-release \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

## Download and install the Microsoft signing key and add the Azure CLI software repository
RUN mkdir -p /etc/apt/keyrings && \
curl -sLS https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | tee /etc/apt/keyrings/microsoft.gpg > /dev/null && \
chmod go+r /etc/apt/keyrings/microsoft.gpg && \
tee /etc/apt/sources.list.d/azure-cli.sources <<EOF
Types: deb
URIs: https://packages.microsoft.com/repos/azure-cli/
Suites: $(lsb_release -cs)
Components: main
Architectures: $(dpkg --print-architecture)
Signed-by: /etc/apt/keyrings/microsoft.gpg
EOF

## Install main packages
RUN apt-get update && \
apt-get --no-install-recommends --yes install \
azure-cli \
curl \
git \
jq \
make \
ncat \
podman \
postgresql-client \
pwgen \
python3-pip \
sudo \
unzip \
wget \
yq \
&& \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*

## Install PIP packages
ARG AZ_VERSION=2.63.0
RUN pip3 install -Iv azure-cli==${AZ_VERSION}

RUN pip3 install yq

## Disable Helmfile upgrade check
ENV HELMFILE_UPGRADE_NOTICE_DISABLED="true"

## Configure Helmfile user and group (using HOME from upstream image)
ARG HELMFILE_UID=1000
ARG HELMFILE_GID=${HELMFILE_UID}
ARG HELMFILE_USER="helmfile"
ARG HELMFILE_GROUP=${HELMFILE_USER}

RUN groupadd -g ${HELMFILE_GID} ${HELMFILE_GROUP} && \
useradd -m -u ${HELMFILE_UID} -g ${HELMFILE_GROUP} ${HELMFILE_USER}
## Reassign the groups and user ID's of the ubuntu group and user to the helmfile group and user
RUN groupmod -n ${HELMFILE_GROUP} ubuntu && \
usermod -l ${HELMFILE_USER} ubuntu && \
usermod -aG ${HELMFILE_GROUP} ${HELMFILE_USER}

RUN chown -R root:${HELMFILE_GROUP} ${HOME} && \
chmod -R 770 ${HOME}
Expand Down
8 changes: 4 additions & 4 deletions helmfile/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,16 @@ See https://docs.github.com/en/actions/creating-actions/dockerfile-support-for-g

This Docker image contains the following primary binaries:

* [`az`](https://pypi.org/project/azure-cli/) (Azure CLI)
* `git`
* [`helm`](https://github.com/helm/helm/releases)
* [`helmfile`](https://github.com/roboll/helmfile/releases)
* [`kubectl`](https://github.com/kubernetes/kubernetes/blob/master/CHANGELOG) (Kubernetes client)

Besides it contains the following secondary binaries:

* [`az`]
* [`psql`]
* [`az`](https://pypi.org/project/azure-cli/) (Azure CLI)
* `git`
* `podman`
* `psql`

## Example:

Expand Down

0 comments on commit a1e78c3

Please sign in to comment.