Skip to content

Commit

Permalink
chore: upgrade docker images
Browse files Browse the repository at this point in the history
  • Loading branch information
this-is-tobi committed Dec 17, 2024
1 parent e72ac73 commit 0082bc5
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 35 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:
if: ${{ steps.image-status.outputs.IMAGE_STATUS == '404' }}

- name: Build docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
if: ${{ steps.image-status.outputs.IMAGE_STATUS == '404' }}
with:
context: ${{ matrix.images.build.context }}
Expand Down
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,27 +6,27 @@ Utility tools & scripts.

### Utils images

| 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/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/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) |
| 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/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/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) |

__Versions correlation table :__

| Name | Image version | Base image |
| ------------ | ------------- | ---------------------------------- |
| act-runner | 2.0.1 | `docker.io/ubuntu:24.04` |
| debug | 2.0.0 | `docker.io/debian:12` |
| dev | 2.0.0 | `docker.io/debian:12` |
| pg-backup | 3.0.1 | `docker.io/postgres:17.2` |
| pg-backup | 2.0.1 | `docker.io/postgresql:16.6` |
| pg-backup | 1.4.4 | `docker.io/postgresql:15.10` |
| s3-backup | 1.1.3 | `docker.io/debian:12` |
| vault-backup | 1.2.1 | `docker.io/hashicorp/vault:1.18.2` |
| act-runner | 2.0.2 | `docker.io/ubuntu:24.04` |
| debug | 2.0.1 | `docker.io/debian:12` |
| dev | 2.0.1 | `docker.io/debian:12` |
| pg-backup | 3.0.2 | `docker.io/postgres:17.2` |
| pg-backup | 2.0.2 | `docker.io/postgresql:16.6` |
| pg-backup | 1.4.5 | `docker.io/postgresql:15.10` |
| s3-backup | 1.1.4 | `docker.io/debian:12` |
| vault-backup | 1.2.2 | `docker.io/hashicorp/vault:1.18.2` |

> [!TIP]
> The backup images are supplied with a sample kubernetes cronjob in their respective folders.
Expand Down
16 changes: 8 additions & 8 deletions ci/matrix.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"context": "./docker/act-runner",
"dockerfile": "./docker/act-runner/Dockerfile",
"target": "build",
"tag": "2.0.1",
"tag": "2.0.2",
"latest": true
}
},
Expand All @@ -17,7 +17,7 @@
"context": "./docker/debug",
"dockerfile": "./docker/debug/Dockerfile",
"target": "build",
"tag": "2.0.0",
"tag": "2.0.1",
"latest": true
}
},
Expand All @@ -28,7 +28,7 @@
"context": "./docker/dev",
"dockerfile": "./docker/dev/Dockerfile",
"target": "build",
"tag": "2.0.0",
"tag": "2.0.1",
"latest": true
}
},
Expand All @@ -39,7 +39,7 @@
"context": "./docker/pg-backup",
"dockerfile": "./docker/pg-backup/Dockerfile",
"target": "build",
"tag": "1.4.4",
"tag": "1.4.5",
"latest": false
}
},
Expand All @@ -50,7 +50,7 @@
"context": "./docker/pg-backup",
"dockerfile": "./docker/pg-backup/Dockerfile",
"target": "build",
"tag": "2.0.1",
"tag": "2.0.2",
"latest": false
}
},
Expand All @@ -61,7 +61,7 @@
"context": "./docker/pg-backup",
"dockerfile": "./docker/pg-backup/Dockerfile",
"target": "build",
"tag": "3.0.1",
"tag": "3.0.2",
"latest": true
}
},
Expand All @@ -72,7 +72,7 @@
"context": "./docker/s3-backup",
"dockerfile": "./docker/s3-backup/Dockerfile",
"target": "build",
"tag": "1.1.3",
"tag": "1.1.4",
"latest": true
}
},
Expand All @@ -83,7 +83,7 @@
"context": "./docker/vault-backup",
"dockerfile": "./docker/vault-backup/Dockerfile",
"target": "build",
"tag": "1.2.1",
"tag": "1.2.2",
"latest": true
}
}
Expand Down
13 changes: 8 additions & 5 deletions docker/debug/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@ ARG BASE_IMAGE=docker.io/debian:12

FROM ${BASE_IMAGE} AS build

# Set system env
ENV DEBIAN_FRONTEND=noninteractive
ENV USER=debian
ENV HOME=/home/$USER

WORKDIR $HOME

RUN apt update && apt install -y \
dnsutils \
git \
Expand All @@ -18,17 +19,19 @@ RUN apt update && apt install -y \
ssh \
sudo \
wget \
zsh \
&& rm -rf /var/lib/apt/lists/*

RUN sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && sudo locale-gen

RUN useradd -ms /bin/zsh "$USER" \
&& echo "export PATH=/usr/local/bin:/usr/bin:/bin:/sbin" >> "/home/$USER/.profile" \
&& echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee "/etc/sudoers.d/$USER"

USER $USER
WORKDIR $HOME

RUN git clone https://github.com/this-is-tobi/dotfiles && touch ./.zshrc \
&& ./dotfiles/setup/setup-debian.sh -p "base,devops" -d
&& ./dotfiles/setup/setup-debian.sh -p "base,devops,secops" -d -c \
&& rm -rf /tmp/*

USER $USER

ENTRYPOINT ["/bin/zsh"]
12 changes: 7 additions & 5 deletions docker/dev/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ ARG BASE_IMAGE=docker.io/debian:12

FROM ${BASE_IMAGE} AS build

# Set system env
ENV DEBIAN_FRONTEND=noninteractive
ENV USER=tobi
ENV HOME=/home/$USER
WORKDIR $HOME

RUN apt update && apt install -y \
dnsutils \
Expand All @@ -18,17 +18,19 @@ RUN apt update && apt install -y \
ssh \
sudo \
wget \
zsh \
&& rm -rf /var/lib/apt/lists/*

RUN sed -i 's/^# *\(en_US.UTF-8\)/\1/' /etc/locale.gen && sudo locale-gen

RUN useradd -ms /bin/zsh "$USER" \
&& echo "export PATH=/usr/local/bin:/usr/bin:/bin:/sbin" >> "/home/$USER/.profile" \
&& echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo tee "/etc/sudoers.d/$USER"

USER $USER
WORKDIR $HOME

RUN git clone https://github.com/this-is-tobi/dotfiles && touch ./.zshrc \
&& ./dotfiles/setup/setup-debian.sh -p "base,devops,go,js" -d
&& ./dotfiles/setup/setup-debian.sh -p "base,devops,secops,go,js" -d -c \
&& rm -rf /tmp/*

USER $USER

ENTRYPOINT ["/bin/zsh"]

0 comments on commit 0082bc5

Please sign in to comment.