Compare commits

..

20 Commits

Author SHA1 Message Date
f8c5a5071d feat(infar): add just
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 1m37s
Build containers / dependent-images (go) (push) Successful in 21s
Build containers / dependent-images (infra) (push) Successful in 54s
Build containers / dependent-images (php) (push) Successful in 1m0s
2026-03-29 15:33:26 +02:00
12a9bec916 fix: PS1 and faster fzf
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 1m3s
Build containers / dependent-images (go) (push) Successful in 21s
Build containers / dependent-images (php) (push) Successful in 47s
Build containers / dependent-images (infra) (push) Successful in 42s
2026-03-22 11:05:39 +01:00
ccd1cafa80 fix: php container
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 1m25s
Build containers / dependent-images (go) (push) Successful in 24s
Build containers / dependent-images (infra) (push) Successful in 1m2s
Build containers / dependent-images (php) (push) Successful in 48s
2026-03-19 21:15:30 +01:00
06491c1a02 ci: remove squash
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 37s
Build containers / dependent-images (go) (push) Successful in 23s
Build containers / dependent-images (php) (push) Successful in 20s
Build containers / dependent-images (infra) (push) Successful in 51s
2026-03-19 21:03:52 +01:00
54534cceab feat: add rg
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 43s
Build containers / dependent-images (go) (push) Successful in 22s
Build containers / dependent-images (php) (push) Successful in 45s
Build containers / dependent-images (infra) (push) Successful in 50s
2026-03-19 20:58:10 +01:00
b44b0c248c ci: squash base container
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 36s
Build containers / dependent-images (go) (push) Successful in 23s
Build containers / dependent-images (php) (push) Successful in 20s
Build containers / dependent-images (infra) (push) Successful in 49s
2026-03-19 20:46:12 +01:00
bc86a1d58c fix: go toolchain
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Has been skipped
Build containers / dependent-images (infra) (push) Successful in 1s
Build containers / dependent-images (php) (push) Successful in 2s
Build containers / dependent-images (go) (push) Successful in 21s
2026-03-19 20:45:13 +01:00
614168c903 fix: remove npm from base container
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 36s
Build containers / dependent-images (go) (push) Successful in 9s
Build containers / dependent-images (php) (push) Successful in 17s
Build containers / dependent-images (infra) (push) Successful in 47s
2026-03-19 20:39:15 +01:00
183ccc0072 fix: remove go from base container
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 42s
Build containers / dependent-images (go) (push) Successful in 9s
Build containers / dependent-images (php) (push) Successful in 20s
Build containers / dependent-images (infra) (push) Successful in 45s
2026-03-19 20:35:38 +01:00
8b31b61380 feat: use go from go.dev and switch to zig as c compiler
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 45s
Build containers / dependent-images (go) (push) Successful in 17s
Build containers / dependent-images (php) (push) Successful in 20s
Build containers / dependent-images (infra) (push) Successful in 54s
2026-03-19 20:33:21 +01:00
5f87d970f9 refactor: remove git perl dependencies
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 45s
Build containers / dependent-images (go) (push) Successful in 19s
Build containers / dependent-images (php) (push) Successful in 22s
Build containers / dependent-images (infra) (push) Successful in 49s
2026-03-19 20:13:03 +01:00
f96fd2eff5 refactor: move nvim to github download
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 45s
Build containers / dependent-images (go) (push) Successful in 17s
Build containers / dependent-images (php) (push) Successful in 19s
Build containers / dependent-images (infra) (push) Successful in 56s
2026-03-19 20:09:48 +01:00
3d4c258bb1 refactor: use github for lazysql and lazydocker
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 2m22s
Build containers / dependent-images (go) (push) Successful in 17s
Build containers / dependent-images (php) (push) Successful in 20s
Build containers / dependent-images (infra) (push) Successful in 56s
2026-03-19 19:57:32 +01:00
9cd843f749 feat: add dnf cache
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 1m16s
Build containers / dependent-images (go) (push) Successful in 21s
Build containers / dependent-images (php) (push) Successful in 18s
Build containers / dependent-images (infra) (push) Successful in 1m0s
2026-03-19 19:49:17 +01:00
18889e3d26 feat: add fd-find 2026-03-19 19:44:13 +01:00
b3215c96f3 refactor: shrink container build
All checks were successful
Build containers / changes (push) Successful in 2s
Build containers / base-image (push) Successful in 44s
Build containers / dependent-images (go) (push) Successful in 17s
Build containers / dependent-images (php) (push) Successful in 23s
Build containers / dependent-images (infra) (push) Successful in 50s
2026-03-17 21:23:54 +01:00
056ff220c5 ci: fix dependent images check 2026-03-17 20:37:39 +01:00
f67738b5ec refactor: simplify container build
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 1m39s
Build containers / dependent-images (go) (push) Successful in 2s
Build containers / dependent-images (infra) (push) Successful in 2s
Build containers / dependent-images (php) (push) Successful in 2s
2026-03-17 20:32:21 +01:00
2ca42d5add refactor: simplify log, die and formatting
All checks were successful
Build containers / changes (push) Successful in 3s
Build containers / base-image (push) Successful in 2m41s
Build containers / dependent-images (go) (push) Successful in 4s
Build containers / dependent-images (infra) (push) Successful in 2s
Build containers / dependent-images (php) (push) Successful in 2s
2026-03-17 20:26:33 +01:00
f895c11cbd feat: add bash vi mode 2026-03-17 20:25:51 +01:00
7 changed files with 44 additions and 38 deletions

View File

@@ -66,13 +66,20 @@ jobs:
dependent-images:
needs: [changes, base-image]
if: always() && needs.changes.result == 'success' && (needs.base-image.result == 'success' || needs.base-image.result == 'skipped') && (needs.changes.outputs[matrix.container] == 'true' || needs.changes.outputs.any_change == 'true')
if: always() && needs.changes.result == 'success' && (needs.base-image.result == 'success' || needs.base-image.result == 'skipped')
runs-on: job-v2
strategy:
fail-fast: false
matrix:
container: [infra, go, php]
steps:
- name: Check if build needed
id: check
run: |
if [[ "${{ matrix.container }}" == "infra" && "${{ needs.changes.outputs.infra }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
if [[ "${{ matrix.container }}" == "go" && "${{ needs.changes.outputs.go }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
if [[ "${{ needs.changes.outputs.any_change }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi
- name: Clone repo
if: steps.check.outputs.run == 'true'
uses: actions/checkout@v4

View File

@@ -3,13 +3,14 @@ FROM quay.io/fedora/fedora:44
# === install system packages ===
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf update -y && \
dnf copr enable -y atim/lazygit && \
dnf copr enable -y atim/lazydocker && \
dnf copr enable -y gierth/tools-golang && \
dnf copr enable -y agriffis/neovim-nightly && \
dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \
host-spawn dbus-launch \
zoxide git npm neovim awk jq unzip fd-find lazygit lazydocker lazysql
dnf -y --setopt=keepcache=1 --setopt=install_weak_deps=False install \
bash-completion git-core fzf curl awk jq fd-find rg unzip which \
host-spawn wl-copy gcc
RUN LAZYGIT_VERSION=$(curl -s "https://api.github.com/repos/jesseduffield/lazygit/releases/latest" | jq -r .tag_name | sed 's/^v//') && \
curl -sL "https://github.com/jesseduffield/lazygit/releases/latest/download/lazygit_${LAZYGIT_VERSION}_linux_x86_64.tar.gz" | tar xz -C /usr/local/bin lazygit && \
curl -sL "https://github.com/jorgerojas26/lazysql/releases/latest/download/lazysql_Linux_x86_64.tar.gz" | tar xz -C /usr/local/bin lazysql && \
curl -sL "https://github.com/neovim/neovim/releases/download/nightly/nvim-linux-x86_64.tar.gz" | tar xz -C /usr/local --strip-components=1
COPY config/bin /usr/local/bin

View File

@@ -1,17 +1,21 @@
source /etc/bashrc
# === bash settings ===
set -o vi
bind -m vi-insert '"\C-l": clear-screen'
# === environment ===
export EDITOR="nvim" \
export PS1="\[\e[30;46m\] \h | \w \[\e[0;36m\]\[\e[m\] " \
EDITOR="nvim" \
WAYLAND_DISPLAY="wayland-0" \
XDG_RUNTIME_DIR="/run/user/1000" \
SSH_AUTH_SOCK="/run/user/1000/ssh-auth-sock" \
TZ="Europe/Amsterdam"
PS1="\[\e[30;46m\] \h | \w \[\e[0;36m\]\[\e[m\] "
TZ="Europe/Amsterdam" \
FZF_CTRL_T_COMMAND="fd --type f --hidden --exclude .git --exclude Library --exclude .cache" \
FZF_ALT_C_COMMAND="fd --type d --hidden --exclude .git --exclude Library --exclude .cache"
# === aliases and functions ===
alias vi=nvim
post() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; }
eval "$(zoxide init --cmd cd bash)"
eval "$(fzf --bash)"

View File

@@ -2,7 +2,9 @@ ARG TAG
FROM job79/base:${TAG}
USER root
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf -y --setopt=keepcache=1 install go
RUN GO_VERSION=$(curl -sL "https://go.dev/VERSION?m=text" | head -n 1 | tr -d '\r\n') && \
curl -sL "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz" | tar xz -C /usr/local && \
ln -sf /usr/local/go/bin/go /usr/local/bin/go && \
ln -sf /usr/local/go/bin/gofmt /usr/local/bin/gofmt
USER user

View File

@@ -3,7 +3,8 @@ FROM job79/base:${TAG}
USER root
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf -y --setopt=keepcache=1 install kubectl k9s openssl age "$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq -r ".assets[] | select(.name | test(\"sops-.*.$(arch).rpm\$\")) | .browser_download_url")" && \
dnf -y --setopt=keepcache=1 --setopt=install_weak_deps=False install \
just kubectl k9s openssl age "$(curl -s https://api.github.com/repos/getsops/sops/releases/latest | jq -r ".assets[] | select(.name | test(\"sops-.*.$(arch).rpm\$\")) | .browser_download_url")" && \
curl -sL https://talos.dev/install | sh && \
curl -s https://fluxcd.io/install.sh | bash

View File

@@ -3,7 +3,7 @@ FROM job79/base:${TAG}
USER root
RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
dnf -y --setopt=keepcache=1 install php composer && \
dnf -y --setopt=keepcache=1 install php composer npm && \
composer global require laravel/installer
USER user

27
devc.sh
View File

@@ -4,8 +4,8 @@
# Dev container entry script. #
# =============================================== #
set -euo pipefail
log() { printf '\e[%sm%s\e[0m %s\n' "${3:-36}" "${2:-}" "$1"; }
die() { log "$1" 'x' 31 && exit 1; }
log() { echo -e "\e[36m○\e[0m $1"; }
die() { echo -e "\e[31mx\e[0m $1" && exit 1; }
# default_args configures standard container options.
default_args() {
@@ -14,8 +14,8 @@ default_args() {
"--hostname" "$name"
"--pull=newer" # Update image.
"--userns=keep-id" # Map host user.
"--net=devc" # Shared network.
"-v" "$name:/home/user:copy" # Persistent home volume.
"-v" "dnf-cache:/var/cache/libdnf5" # Cache dnf metadata.
)
# Unix sockets require SELinux label disable.
@@ -36,17 +36,9 @@ param_args() {
case "$1" in
-gpu) run_opts+=("--device" "/dev/dri") ;;
-host-spawn) run_opts+=("-v" "/run/user/$UID/bus:/tmp/bus" "-e" "HOST_HOME=$HOME") ;;
-container-sock) run_opts+=("-v" "${XDG_RUNTIME_DIR:-/run/user/$UID}/podman/podman.sock:/var/run/docker.sock") ;;
-x11)
run_opts+=("-v" "/tmp/.X11-unix:/tmp/.X11-unix" "-v" "${XAUTHORITY:-$HOME/.Xauthority}:/run/user/1000/.Xauthority:ro")
run_opts+=("-e" "DISPLAY=${DISPLAY:-:0}" "-e" "XAUTHORITY=/run/user/1000/.Xauthority")
;;
-mnt)
local type=''
[[ ! -d "$2" ]] && type='file'
run_opts+=("-w" "/mnt/" "-v" "$2:/mnt/$type")
shift
;;
-container-sock) run_opts+=("-v" "$XDG_RUNTIME_DIR/podman/podman.sock:/var/run/docker.sock") ;;
-x11) run_opts+=("-v" "/tmp/.X11-unix:/tmp/.X11-unix" "-v" "$XAUTHORITY:/run/user/1000/.Xauthority:ro" "-e" "DISPLAY=$DISPLAY" "-e" "XAUTHORITY=/run/user/1000/.Xauthority") ;;
-mnt) shift && run_opts+=("-w" "/mnt/" "-v" "$1:/mnt/$([[ -d "$1" ]] || echo "file")") ;;
*) run_opts+=("$1") ;;
esac
shift
@@ -60,8 +52,8 @@ main() {
# Resolve container name (CLI arg > Last used > Error).
if [[ $image && $image != -* ]]; then
shift
[[ $image == *:* ]] || image+=":main"
mkdir -p "${state_file%/*}" && echo "$image" >"$state_file"
[[ $image != *:* ]] && image+=":main"
echo "$image" >"$state_file"
elif [[ -f $state_file ]]; then
image=$(<$state_file)
else
@@ -72,12 +64,11 @@ main() {
# Start/Restart if not running or if arguments change configuration.
if [[ -z "$(podman ps -q -f name="^$name$" -f status=running)" ]] || (($# > 0)); then
log "starting $image..."
[[ -n "${DEVC_REGISTRY:-}" ]] || die "registry unknown; set the DEVC_REGISTRY environment variable"
default_args
param_args "$@"
podman network create --ignore "devc" &>/dev/null
[[ -n "${DEVC_REGISTRY:-}" ]] || die "registry unknown; set the DEVC_REGISTRY environment variable"
podman run --replace --stop-timeout 0 -td "${run_opts[@]}" "$DEVC_REGISTRY/$image"
fi