Skip to content

Commit

Permalink
feat: add enhanced lightweight mc docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-tobi committed Feb 20, 2025
1 parent 7e73595 commit d4e57ce
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,11 @@ Templates to deploy Github Actions Runners accross a Kubernetes cluster.
| Image | Description | Dockerfiles |
| ------------------------------------------ | ----------------------------------------------------------------------- | ----------------------------------------------- |
| `ghcr.io/this-is-tobi/tools/act-runner` | *act runner image for local CI tests (ubuntu based).* | [Dockerfile](./docker/act-runner/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/curl` | *ligthweight image with bash, curl, jq and openssl (alpine based).* | [Dockerfile](./docker/curl/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/curl` | *ligthweight image with bash, curl, jq, openssl and yq (alpine based).* | [Dockerfile](./docker/curl/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/debug` | *debug image with all convenients tools (debian based).* | [Dockerfile](./docker/debug/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/dev` | *development image with all convenients tools (debian based).* | [Dockerfile](./docker/dev/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/homelab-utils` | *ligthweight image with bash and utilities (alpine based).* | [Dockerfile](./docker/homelab-utils/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/mc` | *ligthweight image with bash, jq, mc and yq (alpine based).* | [Dockerfile](./docker/mc/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/pg-backup` | *helper image to backup postgresql to s3 (postgres based).* | [Dockerfile](./docker/pg-backup/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/s3-backup` | *helper image to backup s3 bucket to another s3 bucket (debian based).* | [Dockerfile](./docker/s3-backup/Dockerfile) |
| `ghcr.io/this-is-tobi/tools/vault-backup` | *helper image to backup vault raft cluster to s3 bucket (vault based).* | [Dockerfile](./docker/vault-backup/Dockerfile) |
Expand All @@ -44,6 +45,7 @@ __Versions correlation table :__
| debug | 2.1.0 | `docker.io/debian:12` |
| dev | 2.0.2 | `docker.io/debian:12` |
| homelab-utils | 0.2.0 | `docker.io/alpine:3.21.3` |
| mc | 1.0.1 | `docker.io/alpine:3.21.3` |
| pg-backup | 3.2.0 | `docker.io/postgres:17.3` |
| pg-backup | 2.2.0 | `docker.io/postgres:16.7` |
| pg-backup | 1.6.0 | `docker.io/postgres:15.11` |
Expand Down
11 changes: 11 additions & 0 deletions ci/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,17 @@
"latest": true
}
},
{
"name": "mc",
"build": {
"base": "docker.io/alpine:3.21.3",
"context": "./docker/mc",
"dockerfile": "./docker/mc/Dockerfile",
"target": "build",
"tag": "1.0.1",
"latest": true
}
},
{
"name": "pg-backup",
"build": {
Expand Down
22 changes: 22 additions & 0 deletions docker/mc/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
ARG BASE_IMAGE=docker.io/alpine:3.21.3

FROM ${BASE_IMAGE} AS build

ARG TARGETARCH
ARG USERNAME=alpine
ARG USER_UID=1000
ARG USER_GID=${USER_UID}
ENV HOME=/home/${USERNAME}

WORKDIR ${HOME}
RUN apk add \
bash \
jq \
wget \
yq \
&& rm -rf /var/cache/apk/* \
&& wget https://dl.min.io/client/mc/release/linux-${TARGETARCH}/mc \
&& mv mc /usr/bin && chmod +x /usr/bin/mc
RUN addgroup -g ${USER_UID} ${USERNAME} && adduser -D -h ${HOME} -s /bin/bash -G ${USERNAME} -u ${USER_UID} ${USERNAME} \
&& chown -R ${USERNAME}:root ${HOME} && chgrp -R 0 ${HOME} && chmod -R g=u ${HOME}
USER ${USERNAME}

0 comments on commit d4e57ce

Please sign in to comment.