Compare commits

..

75 Commits

Author SHA1 Message Date
Job79 882ebfaa00 ci: build all containers
Build container / build (push) Successful in 4m5s
2025-10-06 16:48:18 +02:00
Job79 b3be78041c ci: switch to job-home
Build container / build (push) Failing after 2m8s
2025-10-06 16:39:45 +02:00
Job79 48f13d622b chore: sync from github
Build container / build (push) Has been cancelled
2025-08-29 13:46:15 +02:00
Job79 d5ed7bc7f7 ci: use job.home runner
Build container / build (push) Has been cancelled
2025-07-23 17:05:21 +02:00
Job79 8caa62dc4e ci: use repository owner instead of actor
Build container / build (push) Failing after 33s
2025-03-15 11:10:54 +00:00
Job79 4bd0828cbc Test commit
Build container / build (push) Successful in 2m14s
2025-03-15 10:42:42 +00:00
Job79 0aedb01b60 ci: disable zstd:chunked
Build container / build (push) Successful in 3m8s
2024-12-31 14:50:50 +01:00
Job79 c82407fbd2 ci: switch to container-builder runner tag
Build container / build (push) Successful in 3m29s
2024-12-31 14:37:58 +01:00
Job79 d74c7565bd fix: hide podman pull errors
Build container / build (push) Failing after 5m11s
2024-12-22 15:02:19 +01:00
Job79 a69e237bd6 fix: change directory locations 2024-12-21 20:31:15 +01:00
Job79 9cca35a969 ci: use podman instead of docker for container builds
Build container / build (push) Successful in 9m11s
2024-12-21 11:54:15 +01:00
Job79 b93b0bd735 fix: update nvim config
Container build / container-build (push) Successful in 4m12s
2024-12-20 20:24:46 +01:00
Job79 b745a06eec fix: add lazygit 2024-12-20 20:24:29 +01:00
Job79 9fbc411dab feat(Containerfile): add chafa for image previews
Container build / container-build (push) Successful in 3m48s
2024-12-19 20:02:46 +01:00
Job79 ece5e86a16 feat(bashrc): setup fzf shell integration
Container build / container-build (push) Successful in 5m16s
2024-12-19 19:54:53 +01:00
Job79 065eeedce2 fix(enter.sh): disable podman --detach-keys to fix control + p in neovim
Container build / container-build (push) Has been cancelled
2024-12-19 19:53:14 +01:00
Job79 8f4c57d178 ci: use nexus runner
Container build / container-build (push) Successful in 5m15s
2024-12-19 19:24:01 +01:00
Job79 09af0db185 feat: update nvim config
Container build / container-build (push) Failing after 1m21s
2024-12-19 19:22:24 +01:00
Job79 9d90ea60f2 ci: switch runner to dynamis2
Container build / container-build (push) Failing after 1m54s
2024-12-16 19:08:57 +01:00
Job79 790c7c722c ci: switch to nexus runner
Container build / container-build (push) Successful in 5m21s
2024-12-16 18:42:42 +01:00
Job79 35c4f7ed8f ci: switch to dynamis runner
Container build / container-build (push) Has been cancelled
2024-12-15 18:10:03 +01:00
Job79 8c981a8e8d ci: switch to laptop-vm
Container build / container-build (push) Has been cancelled
2024-12-14 11:02:29 +01:00
Job79 f7da637a1c ci: switch to laptop
Container build / container-build (push) Successful in 4m54s
2024-12-14 10:36:04 +01:00
Job79 f6bd18cf7d fix: add lsp and lazy config
Container build / container-build (push) Successful in 3m22s
2024-12-13 20:22:27 +01:00
Job79 50fc142407 fix: always fetch when image is set 2024-12-13 20:22:11 +01:00
Job79 2d7807ea60 fix: include whole nvim plugin config dir 2024-12-13 20:21:57 +01:00
Job79 5fc464aa6d fix: make /run/user/1000 writable 2024-12-13 20:21:46 +01:00
Job79 3560f348a7 feat: fix container recreate
Container build / container-build (push) Successful in 3m21s
2024-12-13 19:38:03 +01:00
Job79 a0b65c856d feat: add options file 2024-12-13 19:34:16 +01:00
Job79 393e49c781 chore: update config to lazyvim 14 2024-12-13 19:33:52 +01:00
Job79 9bed5b823f chore: update copilot LazyExtra name
Container build / container-build (push) Successful in 3m31s
2024-12-12 21:12:03 +01:00
Job79 641d1c3050 feat: add fancy logging 2024-12-12 21:10:35 +01:00
Job79 e180de3a7b refactor: cleanup config
Container build / container-build (push) Successful in 4m52s
2024-12-12 20:42:39 +01:00
Job79 7fdb0e0fc0 revert: ci: switch to runner-01-x86_64 runner
Container build / container-build (push) Successful in 4m47s
This reverts commit 420d4a287a.
2024-12-08 12:59:41 +01:00
Job79 0c76caa267 fix: escape terminal keymap
Container build / container-build (push) Failing after 1m6s
2024-12-01 11:37:00 +01:00
Job79 420d4a287a ci: switch to runner-01-x86_64 runner
Container build / container-build (push) Failing after 1m16s
2024-11-24 12:20:52 +01:00
Job79 5bc72a6fb3 fix: disable snacks dashboard
Container build / container-build (push) Successful in 3m29s
2024-11-24 10:34:24 +01:00
Job79 a1332e1f69 chore: update to lazyvim 13
Container build / container-build (push) Successful in 5m3s
2024-11-08 18:52:27 +01:00
Job79 d545a9cdf0 fix: remove typo in escape macro
Container build / container-build (push) Successful in 3m20s
2024-11-08 18:38:00 +01:00
Job79 fedeb5d58d feat: update colorscheme
Container build / container-build (push) Successful in 6m0s
2024-11-07 19:21:27 +01:00
Job79 fc68b611fe feat: add some custom keymaps
Container build / container-build (push) Successful in 3m28s
2024-11-06 20:07:24 +01:00
Job79 702687276a feat: only show important notifications
Container build / container-build (push) Successful in 3m26s
2024-11-01 20:37:52 +01:00
Job79 b11b9fd153 docs: add comments to config 2024-11-01 20:37:32 +01:00
Job79 5868d34775 refactor: move .dev directory
Container build / container-build (push) Successful in 5m16s
2024-10-26 15:45:28 +02:00
Job79 6fffe4e0a0 feat: add gruvbox 2024-10-26 15:45:02 +02:00
Job79 ee6ffcd31a feat: disable type hints
Container build / container-build (push) Successful in 3m14s
2024-10-19 12:19:05 +02:00
Job79 4c454ed3ef feat: install tailwind lazyextra 2024-10-19 12:18:50 +02:00
Job79 4a9e54b8b3 ci: set label to plabble-sprinter 2024-10-19 12:18:30 +02:00
Job79 9498c36701 ci: test dynamis2
Container build / container-build (push) Has been cancelled
2024-10-17 19:54:07 +02:00
Job79 8d2948dcef feat: add lazyvim plugins
Container build / container-build (push) Successful in 3m46s
2024-10-14 20:07:29 +02:00
Job79 1bad1c00eb fix: permission of config files 2024-10-14 20:06:29 +02:00
Job79 b6b9fc4f6b ci: switch to plabble action runner
Container build / container-build (push) Successful in 5m30s
2024-10-14 19:35:07 +02:00
Job79 a8ee5a8ee1 build(Containerfile): switch to quay image
Container build / container-build (push) Failing after 1m54s
2024-10-14 19:32:57 +02:00
Job79 ad2f27b8a8 ci: run on dynamis
Container build / container-build (push) Failing after 1m3s
2024-10-14 19:19:41 +02:00
Job79 d97a76499f fix: give container access to host networking
Container build / container-build (push) Successful in 3m54s
2024-10-09 16:23:09 +02:00
Job79 80995c560f fix(enter): use host networking
Container build / container-build (push) Successful in 3m50s
2024-10-06 14:53:37 +02:00
Job79 89dbfcb996 feat: add container update message
Container build / container-build (push) Successful in 3m58s
2024-09-29 16:52:32 +02:00
Job79 a67ea6c795 feat: disable autocomplete with the enter key
Container build / container-build (push) Has been cancelled
2024-09-29 16:49:15 +02:00
Job79 63ac1aae83 feat: handle automatically updates with enter.sh 2024-09-29 16:48:50 +02:00
Job79 df8b7b5bfe feat: add bash_profile for creating copilot directory 2024-09-29 16:48:19 +02:00
Job79 53cfeb1a62 feat: update container on build
Container build / container-build (push) Successful in 3m21s
2024-09-29 11:31:49 +02:00
Job79 562b26b96a ci: build the container weekly 2024-09-29 11:31:47 +02:00
Job79 7465b394f4 feat: keep cache in a volume 2024-09-29 11:29:40 +02:00
Job79 2e49a4f3a3 feat: move to gitea container
Container build / container-build (push) Successful in 2m56s
2024-09-28 20:09:34 +02:00
Job79 755605b2fb fix: move copilot credentials to volume
Container build / container-build (push) Successful in 2m33s
2024-09-28 20:05:30 +02:00
Job79 5c7db03b32 ci: attempt to get cache working
Container build / container-build (push) Has been cancelled
2024-09-28 19:59:48 +02:00
Job79 8c13f219b5 fix: attempt to fix ci errors
Container build / container-build (push) Successful in 3m10s
2024-09-28 19:30:29 +02:00
Job79 6556db0ce6 ci: update docker/build-push-action to v6
Container build / container-build (push) Failing after 1m1s
2024-09-28 19:17:56 +02:00
Job79 0e51472973 ci: add container build
Container build / container-build (push) Successful in 3m56s
2024-09-28 18:01:04 +02:00
Job79 54865b536a feat: make container updates easier 2024-09-28 17:56:33 +02:00
Job79 7a63471603 chore: switch to rosepine themed PS1 2024-09-24 19:24:59 +02:00
Job79 9a20313beb feat: update config 2024-09-24 19:24:17 +02:00
Job79 5e3d7ca7fb feat: switch to lazyvim 2024-09-23 19:56:52 +02:00
Job79 17e3a6840f feat: switch to neovim 2024-09-17 18:32:24 +00:00
Job79 c510c7f919 init 2024-03-30 20:41:55 +01:00
15 changed files with 146 additions and 191 deletions
+43
View File
@@ -0,0 +1,43 @@
name: Build container
on:
push:
pull_request:
branches: ["main"]
schedule:
- cron: "0 16 * * FRI"
jobs:
build:
runs-on: job-latest
steps:
- name: Clone repo
uses: actions/checkout@v4
- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Registry
uses: docker/login-action@v3
with:
registry: git.plabble.org
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_TOKEN }}
- name: Build and push base container
uses: docker/build-push-action@v5
with:
context: ./containers/base
file: ./containers/base/Containerfile
push: true
tags: git.plabble.org/job79/base:latest
- name: Build and push go container
uses: docker/build-push-action@v5
with:
context: ./containers/go
file: ./containers/go/Containerfile
push: true
tags: git.plabble.org/job79/go:latest
- name: Build and push kube container
uses: docker/build-push-action@v5
with:
context: ./containers/kube
file: ./containers/kube/Containerfile
push: true
tags: git.plabble.org/job79/kube:latest
-77
View File
@@ -1,77 +0,0 @@
name: Build container
on:
push:
pull_request:
branches: ["main"]
schedule:
- cron: "0 16 * * FRI"
jobs:
base-build:
runs-on: ubuntu-24.04
steps:
- &clone_repo
name: Clone repo
uses: actions/checkout@v4
- &setup_buildx
name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3
- &login_registry
name: Login to Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push base container
uses: docker/build-push-action@v5
with:
context: ./containers/base
file: ./containers/base/Containerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/base:latest
go-build:
runs-on: ubuntu-24.04
needs: base-build
steps:
- *clone_repo
- *setup_buildx
- *login_registry
- name: Build and push go container
uses: docker/build-push-action@v5
with:
context: ./containers/go
file: ./containers/go/Containerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/go:latest
infra-build:
runs-on: ubuntu-24.04
needs: base-build
steps:
- *clone_repo
- *setup_buildx
- *login_registry
- name: Build and push infra container
uses: docker/build-push-action@v5
with:
context: ./containers/infra
file: ./containers/infra/Containerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/infra:latest
kali-build:
runs-on: ubuntu-24.04
needs: base-build
steps:
- *clone_repo
- *setup_buildx
- *login_registry
- name: Build and push kali container
uses: docker/build-push-action@v5
with:
context: ./containers/kali
file: ./containers/kali/Containerfile
push: true
tags: ghcr.io/${{ github.repository_owner }}/kali:latest
-1
View File
@@ -1 +0,0 @@
state
+1 -3
View File
@@ -1,4 +1,4 @@
FROM quay.io/fedora/fedora:43
FROM quay.io/fedora/fedora:42
# === install system packages ===
RUN dnf update -y && \
@@ -15,8 +15,6 @@ RUN useradd -ms /bin/bash user && \
USER user
WORKDIR /home/user
RUN mkdir .config .local .cache
RUN git clone https://git.plabble.org/Job79/neovim-config.git .config/nvim
COPY --chown=user:user config/bashrc .bashrc
COPY --chown=user:user config/git .config/git/config
COPY config/bin /usr/local/bin
VOLUME /home/user
+4
View File
@@ -1,5 +1,9 @@
. /etc/bashrc
# === container enter logic - cd to ENTER_DIR ===
ENTER_DIR="${ENTER_DIR/#\~/$HOME}"
[ -d "$ENTER_DIR" ] && cd "$ENTER_DIR"
# === environment ===
export EDITOR=nvim \
WAYLAND_DISPLAY=wayland-0 \
+5 -2
View File
@@ -1,3 +1,6 @@
#!/bin/bash
host-spawn -cwd "${PWD/#$HOME/$HOST_HOME}" \
$([ "$(basename "$0")" != "host" ] && echo "$(basename "$0")") "$@"
if [ "$(basename "$0")" != "host" ]; then
host-spawn -cwd "${PWD/#$HOME/$HOST_HOME}" $(basename "$0") "$@"
else
host-spawn -cwd "${PWD/#$HOME/$HOST_HOME}" "$@"
fi
-12
View File
@@ -1,12 +0,0 @@
[user]
email = job@plabble.org
name = Job79
signingKey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsqM6ABAaCTQZ+llFXD3CXrYYuIHDEnvz8IBbXddYEc job@plabble.org
[gpg]
format = ssh
[commit]
gpgSign = true
[push]
autoSetupRemote = true
[init]
defaultBranch = main
+3
View File
@@ -0,0 +1,3 @@
for dir in "Code" "Documents" "Downloads" ".config/devcontainer"; do
arg "-v $HOME/$dir:/home/user/$dir"
done
-1
View File
@@ -1 +0,0 @@
FROM docker.io/kalilinux/kali-rolling
+3
View File
@@ -0,0 +1,3 @@
for dir in "Code" "Downloads" ".config/devcontainer"; do
arg "-v $HOME/$dir:/home/user/$dir"
done
-95
View File
@@ -1,95 +0,0 @@
#!/bin/bash
# =============================================== #
# devc.sh v2.0; job79 #
# Dev container enter script. Handles setting up #
# different dev containers, resuming sessions and #
# automatic container updates. #
# #
# TODO: #
# - Remove security-opt label=disable #
# when possible. #
# - Look into removeing userns=keep-id. #
# - Isolate ssh keys to containers. #
# =============================================== #
set -eu
log() { printf '\e[%sm%s\e[0m %s\n' "${3:-36}" "${2:-}" "$1"; }
arg() { echo -n " $@"; }
# run_args returns the podman run arguments required for
# starting a new container.
default_args() {
arg "--name $name"
arg "--hostname $name"
arg "--pull=newer"
# Disable some security settings so host directories can
# be mounted without problems.
arg "--security-opt label=disable" # disable labeling so mounts don't need to be labeled.
arg "--userns=keep-id" # required for ~/.ssh which is usually 700.
# Mount the wayland socket. Required to get the system
# clipboard (wl-copy) and gui applications working.
[ -e "/run/user/$UID/wayland-0" ] && arg "-v /run/user/$UID/wayland-0:/run/user/1000/wayland-0"
# Mount the ssh socket to get ssh commands working.
[ -e "$SSH_AUTH_SOCK" ] && arg "-v $SSH_AUTH_SOCK:/run/user/1000/ssh-auth-sock"
# Load custom configuration for container.
config_file="$script_dir/containers/$name/config.sh"
[ -f "${config_file}" ] && source "${config_file}"
# Add a volume for the home directory so it survives
# container updates.
arg "-v $name:/home/user:copy"
}
# param_args returns the podman run arguments based on the
# arguments provided to this script.
param_args() {
while test $# -gt 0; do
case "$1" in
-gpu) # Enable gpu acceleration.
arg "--device /dev/dri" ;;
-host-spawn) # Enable spawning host commands from inside the container using host-spawn.
arg "-v /run/user/$UID/bus:/tmp/bus" ;;
*) # Use argument as is.
echo "$1" ;;
esac
shift
done
}
### MAIN ###
script_dir="$(dirname "$(realpath "$0")")"
# Get container registry from DEVC_REGISTRY env variable.
if [ -n "${DEVC_REGISTRY:-}" ]; then
registry="$DEVC_REGISTRY"
else
log "registry unknown; set the DEVC_REGISTRY environment variable" 'x' 31
exit 1
fi
# Get the devcontainer name from the first argument. If not
# provided, use the last used name when possible.
if [[ $# -gt 0 ]] && [[ ${1:-} != -* ]]; then
name="$1"
mkdir -p "$script_dir/state"
echo "$name" >"$script_dir/state/last-name"
shift
elif [ -f "$script_dir/state/last-name" ]; then
name=$(<"$script_dir/state/last-name")
else
log "no container name specified" 'x' 31
exit 1
fi
# Create a new container when the container is not running or
# when any arguments are provided.
if [ "$(podman container inspect "$name" -f {{.State.Running}} 2>&1)" != 'true' ] || [[ $# -gt 0 ]]; then
log "starting devcontainer..."
podman container rm -f -t 0 "$name" 1>/dev/null
podman run -td $(default_args) $(param_args $@) "$registry/$name"
fi
podman exec -it "$name" bash -l
Executable
+85
View File
@@ -0,0 +1,85 @@
#!/bin/bash
# =============================================== #
# enter.sh v2.0; job79 #
# Dev container enter script. Handles setting up #
# different dev containers, resuming sessions and #
# automatic container updates. #
# =============================================== #
set -eu
log() { printf '\e[%sm%s\e[0m %s\n' "${3:-36}" "${2:-}" "$1"; }
arg() { echo -n " $@"; }
# run_args returns the podman run arguments required for
# starting a new container.
run_args() {
arg "--name $name"
# Disable some security settings so host directories can
# be mounted without problems.
arg "--security-opt label=disable" # disable labeling so mounts don't need to be labeled.
arg "--userns=keep-id" # required for ~/.ssh which is usually 700.
# Configure options to get host-spawn to work inside the
# container.
[ -e "/run/user/$UID/bus" ] && arg "-v /run/user/$UID/bus:/tmp/bus" # Use host dbus.
arg "-e HOST_HOME=$HOME" # Used to translate container path to host.
# Use host networking.
arg "--net=host"
# Mount the wayland socket. Required to get the system
# clipbard (wl-copy) and gui applications working.
[ -e "/run/user/$UID/wayland-0" ] && arg "-v /run/user/$UID/wayland-0:/run/user/1000/wayland-0"
arg "--device /dev/dri" # mount gpu devices for gpu acceleration.
# Mount the ssh socket, directory and the git config
# directory. This gets the host ssh and git configuration
# working inside the container.
[ -e "$SSH_AUTH_SOCK" ] && arg "-v $SSH_AUTH_SOCK:/run/user/1000/ssh-auth-sock"
[ -d "$HOME/.ssh" ] && arg "-v $HOME/.ssh:/home/user/.ssh"
[ -d "$HOME/.config/git" ] && arg "-v $HOME/.config/git:/home/user/.config/git"
# Add a volume for the home directory so it survives
# container updates.
arg "-v $name:/home/user:copy"
# Add custom user configuration.
config_file="$script_dir/containers/$name/config.sh"
[ -f "${config_file}" ] && source "${config_file}"
}
### MAIN ###
script_dir="$(dirname "$(realpath "$0")")"
name=$(<"$script_dir/state/last-name")
registry=$(<"$script_dir/state/registry")
pull=false
while test $# -gt 0; do
case "$1" in
-p) pull=true ;;
-*) log "unknown argument '$1'" 'x' 31 ;;
*)
name="$1"
echo "$1" >"$script_dir/state/last-name"
;;
esac
shift
done
if [ "$(podman container inspect "$name" -f {{.State.Running}} 2>&1)" != 'true' ] || [ "$pull" = true ]; then
log "fetching devcontainer updates..."
if [ "$(podman container inspect "$name" -f {{.Image}} 2>&1)" != "$(podman pull -q "$registry/$name" 2>&1)" ] || [ "$pull" = true ]; then
if [ $? -eq 0 ]; then
log "container image downloaded" '✓' 32
else
log "failed to download container image" 'x' 31
fi
podman container rm -f -t 1 "$name" 1>/dev/null
podman run -td $(run_args) "$registry/$name"
else
log "no updates available" '✓' 32
fi
fi
podman start "$name" 1>/dev/null
podman exec -e ENTER_DIR="${PWD/#$HOME/\~}" --detach-keys "ctrl-@" -it "$name" bash -l
+1
View File
@@ -0,0 +1 @@
go
+1
View File
@@ -0,0 +1 @@
ghcr.io/job79