From 778ee0a2a66f5295e70ea9bb4f99dacee8bea418 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:16:51 +0100 Subject: [PATCH 01/40] Tweaks --- .gitea/workflows/fedora.yaml | 47 +++++++++++++++------------ .gitea/workflows/kali.yaml | 37 --------------------- containers/dotnet/Containerfile | 9 +++++ containers/dotnet/install-roslyn.sh | 9 +++++ containers/fedora/Containerfile | 10 ++++-- containers/fedora/config/bashrc | 15 ++++++--- containers/fedora/config/bin/podman | 1 - containers/fedora/config/bin/xdg-open | 1 - containers/fedora/config/git | 8 ++--- containers/go/Containerfile | 5 --- containers/go/config.sh | 2 -- containers/infra/Containerfile | 6 ---- containers/infra/config.sh | 2 -- containers/kali/Containerfile | 17 ---------- containers/php/Containerfile | 3 ++ containers/rust/Containerfile | 4 +++ devc.sh | 5 ++- 17 files changed, 77 insertions(+), 104 deletions(-) delete mode 100644 .gitea/workflows/kali.yaml create mode 100644 containers/dotnet/Containerfile create mode 100644 containers/dotnet/install-roslyn.sh delete mode 120000 containers/fedora/config/bin/podman delete mode 120000 containers/fedora/config/bin/xdg-open delete mode 100644 containers/go/Containerfile delete mode 100644 containers/go/config.sh delete mode 100644 containers/infra/Containerfile delete mode 100644 containers/infra/config.sh delete mode 100644 containers/kali/Containerfile create mode 100644 containers/php/Containerfile create mode 100644 containers/rust/Containerfile diff --git a/.gitea/workflows/fedora.yaml b/.gitea/workflows/fedora.yaml index 90b73cb..07d891a 100644 --- a/.gitea/workflows/fedora.yaml +++ b/.gitea/workflows/fedora.yaml @@ -4,18 +4,10 @@ on: branches: ["main"] paths: - "containers/fedora/**" - - "containers/go/**" - - "containers/infra/**" + - "containers/dotnet/**" + - "containers/rust/**" + - "containers/php/**" - ".gitea/workflows/fedora.yaml" - pull_request: - branches: ["main"] - paths: - - "containers/fedora/**" - - "containers/go/**" - - "containers/infra/**" - - ".gitea/workflows/fedora.yaml" - schedule: - - cron: "0 16 * * FRI" jobs: fedora-build: @@ -31,30 +23,43 @@ jobs: registry: git.plabble.org username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} - - name: Build and push fedora container + + - name: Build and push Fedora container uses: docker/build-push-action@v5 with: context: ./containers/fedora file: ./containers/fedora/Containerfile push: true - tags: git.plabble.org/job79/fedora:${{ github.ref_name }} + tags: git.plabble.org/maurice/fedora:${{ github.ref_name }} build-args: TAG=${{ github.ref_name }} outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - name: Build and push go container + + - name: Build and push Rust container uses: docker/build-push-action@v5 with: - context: ./containers/go - file: ./containers/go/Containerfile + context: ./containers/rust + file: ./containers/rust/Containerfile push: true - tags: git.plabble.org/job79/go:${{ github.ref_name }} + tags: git.plabble.org/maurice/rust:${{ github.ref_name }} build-args: TAG=${{ github.ref_name }} outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - name: Build and push infra container + + - name: Build and push PHP container uses: docker/build-push-action@v5 with: - context: ./containers/infra - file: ./containers/infra/Containerfile + context: ./containers/php + file: ./containers/php/Containerfile push: true - tags: git.plabble.org/job79/infra:${{ github.ref_name }} + tags: git.plabble.org/maurice/php:${{ github.ref_name }} + build-args: TAG=${{ github.ref_name }} + outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true + + - name: Build and push C# container + uses: docker/build-push-action@v5 + with: + context: ./containers/dotnet + file: ./containers/dotnet/Containerfile + push: true + tags: git.plabble.org/maurice/dotnet:${{ github.ref_name }} build-args: TAG=${{ github.ref_name }} outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true diff --git a/.gitea/workflows/kali.yaml b/.gitea/workflows/kali.yaml deleted file mode 100644 index 5d8e2cc..0000000 --- a/.gitea/workflows/kali.yaml +++ /dev/null @@ -1,37 +0,0 @@ -name: Build container -on: - push: - branches: ["main"] - paths: - - "containers/kali/**" - - ".gitea/workflows/kali.yaml" - pull_request: - branches: ["main"] - paths: - - "containers/kali/**" - - ".gitea/workflows/kali.yaml" - schedule: - - cron: "0 16 * * FRI" - -jobs: - kali-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 kali container - uses: docker/build-push-action@v5 - with: - context: ./containers/kali - file: ./containers/kali/Containerfile - push: true - tags: git.plabble.org/job79/kali:${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true diff --git a/containers/dotnet/Containerfile b/containers/dotnet/Containerfile new file mode 100644 index 0000000..c24c304 --- /dev/null +++ b/containers/dotnet/Containerfile @@ -0,0 +1,9 @@ +FROM git.plabble.org/maurice/devc-base:main + +USER root +RUN dnf -y install dotnet-sdk-9.0 + +COPY scripts/install-roslyn.sh /tmp/install-roslyn.sh +RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh + +USER user \ No newline at end of file diff --git a/containers/dotnet/install-roslyn.sh b/containers/dotnet/install-roslyn.sh new file mode 100644 index 0000000..565abb0 --- /dev/null +++ b/containers/dotnet/install-roslyn.sh @@ -0,0 +1,9 @@ +#!/bin/bash +version="v1.39.15-beta.60" +arch="linux-musl-x64" +link="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$arch-net6.0.tar.gz" + +wget -O /tmp/omnisharp.tar.gz $link +mkdir /home/user/.omnisharp +tar -zxf /tmp/omnisharp.tar.gz -C /home/user/.omnisharp/ +chown -R user:user /home/user/.omnisharp \ No newline at end of file diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index df54734..d1ac034 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -5,7 +5,7 @@ RUN dnf update -y && \ dnf copr enable -y atim/lazygit && \ dnf -y install procps ping bash-completion glibc-langpack-en \ host-spawn dbus-launch \ - zoxide git npm neovim awk jq unzip fd-find lazygit + git pnpm helix # === setup user === RUN useradd -ms /bin/bash user && \ @@ -16,9 +16,15 @@ 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 +# === Add host entry for podman === +RUN ln -s /usr/local/bin/host /usr/local/bin/podman + +# === Setup PNPM & install language servers === +RUN /bin/bash -c "pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ + typescript typescript-language-server" + VOLUME /home/user diff --git a/containers/fedora/config/bashrc b/containers/fedora/config/bashrc index c5cc3fa..ae6b1c7 100644 --- a/containers/fedora/config/bashrc +++ b/containers/fedora/config/bashrc @@ -1,7 +1,7 @@ . /etc/bashrc # === environment === -export EDITOR=nvim \ +export EDITOR=hx \ WAYLAND_DISPLAY=wayland-0 \ XDG_RUNTIME_DIR=/run/user/1000 \ SSH_AUTH_SOCK=/run/user/1000/ssh-auth-sock \ @@ -9,8 +9,13 @@ export EDITOR=nvim \ TZ="Europe/Amsterdam" # === aliases and functions === -alias vi=nvim -post() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; } +pbcopy() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; } +alias random="cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1" -eval "$(zoxide init --cmd cd bash)" -eval "$(fzf --bash)" +# Git aliases +alias gc="git commit -m" +alias ga="git add -A" +alias gf="git fetch" +alias gp="git pull" +alias gpp="git push" +alias gs="git status" \ No newline at end of file diff --git a/containers/fedora/config/bin/podman b/containers/fedora/config/bin/podman deleted file mode 120000 index fe198d7..0000000 --- a/containers/fedora/config/bin/podman +++ /dev/null @@ -1 +0,0 @@ -host \ No newline at end of file diff --git a/containers/fedora/config/bin/xdg-open b/containers/fedora/config/bin/xdg-open deleted file mode 120000 index fe198d7..0000000 --- a/containers/fedora/config/bin/xdg-open +++ /dev/null @@ -1 +0,0 @@ -host \ No newline at end of file diff --git a/containers/fedora/config/git b/containers/fedora/config/git index d898cb2..6ca2f0b 100644 --- a/containers/fedora/config/git +++ b/containers/fedora/config/git @@ -1,7 +1,7 @@ [user] - email = job@plabble.org - name = Job79 - signingKey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPsqM6ABAaCTQZ+llFXD3CXrYYuIHDEnvz8IBbXddYEc job@plabble.org + email = maurict@pm.me + name = Maurice + signingKey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGL/am4HDyfV0OWwaI3CeKGypBdzNXOYSbcnm6tK/VB+ maurict@pm.me [gpg] format = ssh [commit] @@ -9,4 +9,4 @@ [push] autoSetupRemote = true [init] - defaultBranch = main + defaultBranch = main \ No newline at end of file diff --git a/containers/go/Containerfile b/containers/go/Containerfile deleted file mode 100644 index cc4ada4..0000000 --- a/containers/go/Containerfile +++ /dev/null @@ -1,5 +0,0 @@ -ARG TAG -FROM git.plabble.org/job79/fedora:${TAG} -USER root -RUN dnf -y install go -USER user diff --git a/containers/go/config.sh b/containers/go/config.sh deleted file mode 100644 index 276f925..0000000 --- a/containers/go/config.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -arg "-v $HOME/Documents/containers/go:/home/user/projects" diff --git a/containers/infra/Containerfile b/containers/infra/Containerfile deleted file mode 100644 index 70f1418..0000000 --- a/containers/infra/Containerfile +++ /dev/null @@ -1,6 +0,0 @@ -ARG TAG -FROM git.plabble.org/job79/fedora:${TAG} -USER root -RUN dnf -y install kubectl openssl -RUN curl -sL https://talos.dev/install | sh -USER user diff --git a/containers/infra/config.sh b/containers/infra/config.sh deleted file mode 100644 index efcc191..0000000 --- a/containers/infra/config.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -arg "-v $HOME/Documents/containers/infra:/home/user/projects" diff --git a/containers/kali/Containerfile b/containers/kali/Containerfile deleted file mode 100644 index 42b4984..0000000 --- a/containers/kali/Containerfile +++ /dev/null @@ -1,17 +0,0 @@ -FROM docker.io/kalilinux/kali-rolling - -# === install system packages === -RUN apt update && \ - apt -y install iputils-ping sudo \ - zoxide git npm neovim gawk jq unzip fd-find lazygit - -# === setup user === -RUN useradd -ms /bin/bash user && \ - usermod -aG sudo user && sed -i 's/^%sudo\s\+ALL=(ALL:ALL)\s\+ALL$/%sudo\tALL=(ALL:ALL)\tNOPASSWD: ALL/' /etc/sudoers && \ - mkdir -p /run/user/1000 && chown user:user /run/user/1000 - -USER user -WORKDIR /home/user -RUN mkdir -p .config .local .cache -RUN git clone https://git.plabble.org/Job79/neovim-config.git .config/nvim -VOLUME /home/user diff --git a/containers/php/Containerfile b/containers/php/Containerfile new file mode 100644 index 0000000..8d2db8e --- /dev/null +++ b/containers/php/Containerfile @@ -0,0 +1,3 @@ +FROM git.plabble.org/maurice/devc-base:main + +RUN /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file diff --git a/containers/rust/Containerfile b/containers/rust/Containerfile new file mode 100644 index 0000000..ce3336d --- /dev/null +++ b/containers/rust/Containerfile @@ -0,0 +1,4 @@ +FROM git.plabble.org/maurice/devc-base:main + +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer \ No newline at end of file diff --git a/devc.sh b/devc.sh index 0a86901..12b5995 100755 --- a/devc.sh +++ b/devc.sh @@ -1,6 +1,6 @@ #!/bin/bash # =============================================== # -# devc.sh v2.0; job79 # +# devc.sh v2.0; job79, maurice # # Dev container enter script. Handles setting up # # different dev containers, resuming sessions and # # automatic container updates. # @@ -36,6 +36,9 @@ default_args() { # restarts. Use copy to keep the files from the image. arg "-v $name:/home/user:copy" + # Mount dev folder + arg "-v $HOME/dev:/home/user/dev" + # If there is custom configuration for the container, load # it here. config_file="$(dirname "$(realpath "$0")")/containers/$name/config.sh" -- 2.54.0 From 8a47711c613f49435352a192451aad0ea2ded01c Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:17:25 +0100 Subject: [PATCH 02/40] Fix --- containers/dotnet/Containerfile | 2 +- containers/php/Containerfile | 2 +- containers/rust/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/dotnet/Containerfile b/containers/dotnet/Containerfile index c24c304..3b8b6dd 100644 --- a/containers/dotnet/Containerfile +++ b/containers/dotnet/Containerfile @@ -1,4 +1,4 @@ -FROM git.plabble.org/maurice/devc-base:main +FROM git.plabble.org/maurice/fedora:main USER root RUN dnf -y install dotnet-sdk-9.0 diff --git a/containers/php/Containerfile b/containers/php/Containerfile index 8d2db8e..335ee53 100644 --- a/containers/php/Containerfile +++ b/containers/php/Containerfile @@ -1,3 +1,3 @@ -FROM git.plabble.org/maurice/devc-base:main +FROM git.plabble.org/maurice/fedora:main RUN /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file diff --git a/containers/rust/Containerfile b/containers/rust/Containerfile index ce3336d..8606a66 100644 --- a/containers/rust/Containerfile +++ b/containers/rust/Containerfile @@ -1,4 +1,4 @@ -FROM git.plabble.org/maurice/devc-base:main +FROM git.plabble.org/maurice/fedora:main RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer \ No newline at end of file -- 2.54.0 From cd129f21f738c0f8e481bd2694f1ec1092093f23 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:24:18 +0100 Subject: [PATCH 03/40] Try trigger --- containers/dotnet/Containerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/containers/dotnet/Containerfile b/containers/dotnet/Containerfile index 3b8b6dd..9143c23 100644 --- a/containers/dotnet/Containerfile +++ b/containers/dotnet/Containerfile @@ -6,4 +6,5 @@ RUN dnf -y install dotnet-sdk-9.0 COPY scripts/install-roslyn.sh /tmp/install-roslyn.sh RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh -USER user \ No newline at end of file +USER user +RUN dotnet tool install --global dotnet-ef \ No newline at end of file -- 2.54.0 From 0aba4320766c268337b898ebc1b606e1e64d40a7 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:26:03 +0100 Subject: [PATCH 04/40] Helix config --- containers/fedora/Containerfile | 1 + containers/fedora/config/helix/config.toml | 4 ++++ containers/fedora/config/helix/languages.toml | 12 ++++++++++++ 3 files changed, 17 insertions(+) create mode 100644 containers/fedora/config/helix/config.toml create mode 100644 containers/fedora/config/helix/languages.toml diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index d1ac034..18381b1 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -18,6 +18,7 @@ RUN mkdir .config .local .cache COPY --chown=user:user config/bashrc .bashrc COPY --chown=user:user config/git .config/git/config +COPY --chown=user:user config/helix/ .config/helix/ COPY config/bin /usr/local/bin # === Add host entry for podman === diff --git a/containers/fedora/config/helix/config.toml b/containers/fedora/config/helix/config.toml new file mode 100644 index 0000000..85eb19d --- /dev/null +++ b/containers/fedora/config/helix/config.toml @@ -0,0 +1,4 @@ +theme = "dark_plus" + +[editor.file-picker] +hidden = false \ No newline at end of file diff --git a/containers/fedora/config/helix/languages.toml b/containers/fedora/config/helix/languages.toml new file mode 100644 index 0000000..f1dbd9a --- /dev/null +++ b/containers/fedora/config/helix/languages.toml @@ -0,0 +1,12 @@ +# C# +[language-server.omnisharp] +command = "/home/user/.omnisharp/OmniSharp" +args = [ "--languageserver" ] + +# Rust +[language-server.rust-analyzer.config.check] +command = "clippy" + +[[language]] +name = "rust" +formatter = { command = "rustfmt" } \ No newline at end of file -- 2.54.0 From 785f2aa857cf115f75d3b8b33b69ff0a3f8c457e Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:26:41 +0100 Subject: [PATCH 05/40] fix --- containers/fedora/Containerfile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index 18381b1..6b0f460 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -12,6 +12,9 @@ RUN useradd -ms /bin/bash user && \ usermod -aG wheel user && sed -i '/NOPASSWD/s/^#//g' /etc/sudoers && \ mkdir -p /run/user/1000 && chown user:user /run/user/1000 +# === Add host entry for podman === +RUN ln -s /usr/local/bin/host /usr/local/bin/podman + USER user WORKDIR /home/user RUN mkdir .config .local .cache @@ -21,9 +24,6 @@ COPY --chown=user:user config/git .config/git/config COPY --chown=user:user config/helix/ .config/helix/ COPY config/bin /usr/local/bin -# === Add host entry for podman === -RUN ln -s /usr/local/bin/host /usr/local/bin/podman - # === Setup PNPM & install language servers === RUN /bin/bash -c "pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ typescript typescript-language-server" -- 2.54.0 From 4db483e992f2d90e0e1795fc65507df46dea7d41 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:29:51 +0100 Subject: [PATCH 06/40] Try --- containers/fedora/Containerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index 6b0f460..1acc690 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -25,6 +25,7 @@ COPY --chown=user:user config/helix/ .config/helix/ COPY config/bin /usr/local/bin # === Setup PNPM & install language servers === +SHELL ["/bin/bash", "-c"] RUN /bin/bash -c "pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ typescript typescript-language-server" -- 2.54.0 From 6e64e2237bfc32c0cd19ef6a8f42672c14525023 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:32:36 +0100 Subject: [PATCH 07/40] Shell --- containers/fedora/Containerfile | 3 +-- containers/fedora/config/bashrc | 3 ++- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index 1acc690..8950d67 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -25,8 +25,7 @@ COPY --chown=user:user config/helix/ .config/helix/ COPY config/bin /usr/local/bin # === Setup PNPM & install language servers === -SHELL ["/bin/bash", "-c"] -RUN /bin/bash -c "pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ +RUN /bin/bash -c "SHELL=/bin/bash pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ typescript typescript-language-server" VOLUME /home/user diff --git a/containers/fedora/config/bashrc b/containers/fedora/config/bashrc index ae6b1c7..c1191d0 100644 --- a/containers/fedora/config/bashrc +++ b/containers/fedora/config/bashrc @@ -6,7 +6,8 @@ export EDITOR=hx \ XDG_RUNTIME_DIR=/run/user/1000 \ SSH_AUTH_SOCK=/run/user/1000/ssh-auth-sock \ PS1="\[\e[30;46m\] \h | \w \[\e[0;36m\]î‚°\[\e[m\] " \ - TZ="Europe/Amsterdam" + TZ="Europe/Amsterdam" \ + SHELL="/bin/bash" # === aliases and functions === pbcopy() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; } -- 2.54.0 From 78ceec49069434c85477356afe550af19a44fe01 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:38:34 +0100 Subject: [PATCH 08/40] Fix php --- containers/php/Containerfile | 1 + 1 file changed, 1 insertion(+) diff --git a/containers/php/Containerfile b/containers/php/Containerfile index 335ee53..bfaf21b 100644 --- a/containers/php/Containerfile +++ b/containers/php/Containerfile @@ -1,3 +1,4 @@ FROM git.plabble.org/maurice/fedora:main +RUN export TERM=xterm RUN /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file -- 2.54.0 From b039e281665b542b0051b8041c13f4fdcbc7abe2 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:50:03 +0100 Subject: [PATCH 09/40] Try fix PHP --- containers/fedora/config/helix/config.toml | 3 +++ containers/php/Containerfile | 3 +-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/containers/fedora/config/helix/config.toml b/containers/fedora/config/helix/config.toml index 85eb19d..74e2046 100644 --- a/containers/fedora/config/helix/config.toml +++ b/containers/fedora/config/helix/config.toml @@ -1,4 +1,7 @@ theme = "dark_plus" +[editor] +true-color = true + [editor.file-picker] hidden = false \ No newline at end of file diff --git a/containers/php/Containerfile b/containers/php/Containerfile index bfaf21b..11fa9d6 100644 --- a/containers/php/Containerfile +++ b/containers/php/Containerfile @@ -1,4 +1,3 @@ FROM git.plabble.org/maurice/fedora:main -RUN export TERM=xterm -RUN /bin/bash -c "$(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file +RUN /bin/bash -c "TERM=xterm $(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file -- 2.54.0 From a3abeb44d78a9e9539c6bbe7095e50617d5239ae Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 09:57:23 +0100 Subject: [PATCH 10/40] Fix PHP --- containers/php/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/php/Containerfile b/containers/php/Containerfile index 11fa9d6..bb209a9 100644 --- a/containers/php/Containerfile +++ b/containers/php/Containerfile @@ -1,3 +1,3 @@ FROM git.plabble.org/maurice/fedora:main -RUN /bin/bash -c "TERM=xterm $(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file +RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file -- 2.54.0 From f0a71e9d47312a967f1ef3995e7f9194a68475d3 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 10:03:48 +0100 Subject: [PATCH 11/40] Update dotnet --- containers/dotnet/Containerfile | 2 +- containers/rider/Containerfile | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 containers/rider/Containerfile diff --git a/containers/dotnet/Containerfile b/containers/dotnet/Containerfile index 9143c23..edc8351 100644 --- a/containers/dotnet/Containerfile +++ b/containers/dotnet/Containerfile @@ -3,7 +3,7 @@ FROM git.plabble.org/maurice/fedora:main USER root RUN dnf -y install dotnet-sdk-9.0 -COPY scripts/install-roslyn.sh /tmp/install-roslyn.sh +COPY install-roslyn.sh /tmp/install-roslyn.sh RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh USER user diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile new file mode 100644 index 0000000..f2dc114 --- /dev/null +++ b/containers/rider/Containerfile @@ -0,0 +1,7 @@ +FROM git.plabble.org/maurice/dotnet:main + +ARG rider_version="2025.2.3" +ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" + +RUN curl -o /tmp/rider.tar.gz ${download_uri} && \ + tar -zxf /tmp/rider.tar.gz -C /home/user/Rider \ No newline at end of file -- 2.54.0 From 2d111c34a742dfa7d93671b7c9386593328f10d5 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 12:14:28 +0100 Subject: [PATCH 12/40] New containers --- .gitea/workflows/other.yaml | 48 ++++++++++++++++++++++++++++++++ containers/android/Containerfile | 18 ++++++++++++ containers/android/env | 1 + containers/fedora/Containerfile | 2 +- containers/flutter/Containerfile | 11 ++++++++ containers/rider/Containerfile | 16 ++++++++--- containers/rider/env | 1 + devc.sh | 8 ++++++ 8 files changed, 100 insertions(+), 5 deletions(-) create mode 100644 .gitea/workflows/other.yaml create mode 100644 containers/android/Containerfile create mode 100644 containers/android/env create mode 100644 containers/flutter/Containerfile create mode 100644 containers/rider/env diff --git a/.gitea/workflows/other.yaml b/.gitea/workflows/other.yaml new file mode 100644 index 0000000..129685a --- /dev/null +++ b/.gitea/workflows/other.yaml @@ -0,0 +1,48 @@ +name: Build optional dev containers +on: + workflow_dispatch: # This makes the workflow manually triggered + +jobs: + fedora-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 Rider container + uses: docker/build-push-action@v5 + with: + context: ./containers/rider + file: ./containers/rider/Containerfile + push: true + tags: git.plabble.org/maurice/rider:${{ github.ref_name }} + build-args: TAG=${{ github.ref_name }} + outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true + + - name: Build and push Android Studio container + uses: docker/build-push-action@v5 + with: + context: ./containers/android + file: ./containers/android/Containerfile + push: true + tags: git.plabble.org/maurice/android:${{ github.ref_name }} + build-args: TAG=${{ github.ref_name }} + outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true + + - name: Build and push Flutter container + uses: docker/build-push-action@v5 + with: + context: ./containers/flutter + file: ./containers/flutter/Containerfile + push: true + tags: git.plabble.org/maurice/flutter:${{ github.ref_name }} + build-args: TAG=${{ github.ref_name }} + outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true \ No newline at end of file diff --git a/containers/android/Containerfile b/containers/android/Containerfile new file mode 100644 index 0000000..14b2431 --- /dev/null +++ b/containers/android/Containerfile @@ -0,0 +1,18 @@ +FROM git.plabble.org/maurice/dotnet:main +ARG studio_version="2025.1.4.8" +ARG download_uri="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${studio_version}/android-studio-${studio_version}-linux.tar.gz" + +USER root +RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU +USER user + +RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \ + mkdir /home/user/AndroidStudio && \ + mkdir /home/user/Android && \ + tar -zxf /tmp/studio.tar.gz -C /home/user/AndroidStudio && \ + rm /tmp/studio.tar.gz && \ + mv /home/user/AndroidStudio/android-studio*/* /home/user/AndroidStudio + +RUN echo 'alias studio="$HOME/AndroidStudio/bin/studio"' >> /home/user/.bashrc +RUN echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> /home/user/.bashrc +RUN echo 'export PATH="$ANDROID_HOME/platform-tools:$PATH"' >> /home/user/.bashrc \ No newline at end of file diff --git a/containers/android/env b/containers/android/env new file mode 100644 index 0000000..a82a63b --- /dev/null +++ b/containers/android/env @@ -0,0 +1 @@ +DEVC_COMMAND=/home/user/AndroidStudio/bin/studio \ No newline at end of file diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index 8950d67..f1efba5 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -5,7 +5,7 @@ RUN dnf update -y && \ dnf copr enable -y atim/lazygit && \ dnf -y install procps ping bash-completion glibc-langpack-en \ host-spawn dbus-launch \ - git pnpm helix + git pnpm helix zip # === setup user === RUN useradd -ms /bin/bash user && \ diff --git a/containers/flutter/Containerfile b/containers/flutter/Containerfile new file mode 100644 index 0000000..50ec34f --- /dev/null +++ b/containers/flutter/Containerfile @@ -0,0 +1,11 @@ +FROM git.plabble.org/maurice/android:main +ARG flutter_version="3.35.7-stable" +ARG download_uri="https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${flutter_version}.tar.xz" + +RUN mkdir /home/user/Flutter && \ + curl -Lo /tmp/flutter.tar.xz "${download_uri}" && \ + tar -xf /tmp/flutter.tar.xz -C /home/user/Flutter && \ + rm /tmp/flutter.tar.xz + +RUN echo 'export PATH="$HOME/Flutter/flutter/bin:$PATH"' >> /home/user/.bashrc +RUN echo 'export FLUTTER_ROOT="$HOME/Flutter/flutter"' >> /home/user/.bashrc \ No newline at end of file diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile index f2dc114..3af1ef6 100644 --- a/containers/rider/Containerfile +++ b/containers/rider/Containerfile @@ -1,7 +1,15 @@ FROM git.plabble.org/maurice/dotnet:main - -ARG rider_version="2025.2.3" +ARG rider_version="2025.2.4" ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" -RUN curl -o /tmp/rider.tar.gz ${download_uri} && \ - tar -zxf /tmp/rider.tar.gz -C /home/user/Rider \ No newline at end of file +USER root +RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel +USER user + +RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \ + mkdir /home/user/Rider && \ + tar -zxf /tmp/rider.tar.gz -C /home/user/Rider && \ + rm /tmp/rider.tar.gz && \ + mv /home/user/Rider/JetBrains*/* /home/user/Rider + +RUN echo 'alias rider="$HOME/Rider/bin/rider"' >> /home/user/.bashrc \ No newline at end of file diff --git a/containers/rider/env b/containers/rider/env new file mode 100644 index 0000000..d58a67c --- /dev/null +++ b/containers/rider/env @@ -0,0 +1 @@ +DEVC_COMMAND=/home/user/Rider/bin/rider \ No newline at end of file diff --git a/devc.sh b/devc.sh index 12b5995..190d675 100755 --- a/devc.sh +++ b/devc.sh @@ -52,6 +52,10 @@ param_args() { case "$1" in -gpu) # Enable gpu acceleration. arg "--device /dev/dri" ;; + -kvm) # Enable KVM + arg "--device /dev/kvm" ;; + -usb) # Enable USB access + arg "--device /dev/bus/usb" ;; -host-spawn) # Enable spawning host commands from inside the container using host-spawn. arg "-v /run/user/$UID/bus:/tmp/bus" arg "-e HOST_HOME=$HOME" # Used to translate paths. @@ -85,6 +89,10 @@ else fi name="${image%:*}" +# check if ENV file is present, if so, source it +env_file="$(dirname "$(realpath "$0")")/containers/$name/env" +[ -f "$env_file" ] && source "${env_file}" + # Get container registry from the DEVC_REGISTRY env # variable. if [ -n "${DEVC_REGISTRY:-}" ]; then -- 2.54.0 From f2303898250922d6a00aedc7b89262d8dd9679b5 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 28 Oct 2025 13:06:57 +0100 Subject: [PATCH 13/40] Fix dotnet --- containers/dotnet/install-roslyn.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/dotnet/install-roslyn.sh b/containers/dotnet/install-roslyn.sh index 565abb0..2ab3518 100644 --- a/containers/dotnet/install-roslyn.sh +++ b/containers/dotnet/install-roslyn.sh @@ -1,9 +1,9 @@ #!/bin/bash version="v1.39.15-beta.60" -arch="linux-musl-x64" +arch="linux-x64" link="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$arch-net6.0.tar.gz" -wget -O /tmp/omnisharp.tar.gz $link +curl -Lo /tmp/omnisharp.tar.gz $link mkdir /home/user/.omnisharp tar -zxf /tmp/omnisharp.tar.gz -C /home/user/.omnisharp/ chown -R user:user /home/user/.omnisharp \ No newline at end of file -- 2.54.0 From 8be0e326ca82e7e71b4a27246f38e9f64c0ca58e Mon Sep 17 00:00:00 2001 From: maurice Date: Fri, 31 Oct 2025 11:20:16 +0100 Subject: [PATCH 14/40] Updates --- containers/android/env | 1 - containers/fedora/config.sh | 2 ++ containers/rider/config.sh | 3 +++ containers/rider/env | 1 - devc.sh | 8 ++++---- 5 files changed, 9 insertions(+), 6 deletions(-) delete mode 100644 containers/android/env create mode 100644 containers/fedora/config.sh create mode 100644 containers/rider/config.sh delete mode 100644 containers/rider/env diff --git a/containers/android/env b/containers/android/env deleted file mode 100644 index a82a63b..0000000 --- a/containers/android/env +++ /dev/null @@ -1 +0,0 @@ -DEVC_COMMAND=/home/user/AndroidStudio/bin/studio \ No newline at end of file diff --git a/containers/fedora/config.sh b/containers/fedora/config.sh new file mode 100644 index 0000000..c7cfb14 --- /dev/null +++ b/containers/fedora/config.sh @@ -0,0 +1,2 @@ +#!/bin/bash +arg "-p 8080:8080" diff --git a/containers/rider/config.sh b/containers/rider/config.sh new file mode 100644 index 0000000..d0e2d31 --- /dev/null +++ b/containers/rider/config.sh @@ -0,0 +1,3 @@ +#!/bin/bash +arg "-p 8080:8080" +arg "-p 8081:8081" diff --git a/containers/rider/env b/containers/rider/env deleted file mode 100644 index d58a67c..0000000 --- a/containers/rider/env +++ /dev/null @@ -1 +0,0 @@ -DEVC_COMMAND=/home/user/Rider/bin/rider \ No newline at end of file diff --git a/devc.sh b/devc.sh index 190d675..c0cf893 100755 --- a/devc.sh +++ b/devc.sh @@ -60,6 +60,9 @@ param_args() { arg "-v /run/user/$UID/bus:/tmp/bus" arg "-e HOST_HOME=$HOME" # Used to translate paths. ;; + -net) # Enable network dev- + arg "--network dev-$name" + ;; -x11) # Enable X11 support. arg "-v /tmp/.X11-unix:/tmp/.X11-unix" arg "-v $XAUTHORITY:/run/user/1000/.Xauthority:ro" @@ -89,10 +92,6 @@ else fi name="${image%:*}" -# check if ENV file is present, if so, source it -env_file="$(dirname "$(realpath "$0")")/containers/$name/env" -[ -f "$env_file" ] && source "${env_file}" - # Get container registry from the DEVC_REGISTRY env # variable. if [ -n "${DEVC_REGISTRY:-}" ]; then @@ -112,6 +111,7 @@ fi # recreate it. if [ "$(podman container inspect "$name" -f {{.State.Running}} 2>&1)" != 'true' ] || [[ $# -gt 0 ]]; then log "starting devcontainer..." + podman network create --ignore "dev-$name" podman container rm -f -t 0 "$name" 1>/dev/null podman run -td $(default_args) $(param_args $@) "$registry/$image" fi -- 2.54.0 From baad26211ef56bf3779973b30437f3082f8a7abb Mon Sep 17 00:00:00 2001 From: maurice Date: Fri, 31 Oct 2025 12:31:04 +0100 Subject: [PATCH 15/40] Fix :) --- devc.sh | 11 ++++++++--- example-bashrc | 28 ++++++++++++++++++++++++++++ 2 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 example-bashrc diff --git a/devc.sh b/devc.sh index c0cf893..24cbb68 100755 --- a/devc.sh +++ b/devc.sh @@ -36,9 +36,6 @@ default_args() { # restarts. Use copy to keep the files from the image. arg "-v $name:/home/user:copy" - # Mount dev folder - arg "-v $HOME/dev:/home/user/dev" - # If there is custom configuration for the container, load # it here. config_file="$(dirname "$(realpath "$0")")/containers/$name/config.sh" @@ -63,6 +60,14 @@ param_args() { -net) # Enable network dev- arg "--network dev-$name" ;; + -mnt) # Mount directory. + shift + arg "-w /workdir/" + arg "-v $1:/workdir/$([ ! -d "$1" ] && echo $1)" + ;; + -mdf) # Mount dev folder + arg "-v $HOME/dev:/home/user/dev" + ;; -x11) # Enable X11 support. arg "-v /tmp/.X11-unix:/tmp/.X11-unix" arg "-v $XAUTHORITY:/run/user/1000/.Xauthority:ro" diff --git a/example-bashrc b/example-bashrc new file mode 100644 index 0000000..5d2a215 --- /dev/null +++ b/example-bashrc @@ -0,0 +1,28 @@ +# Tools +pbcopy() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; } +alias code="flatpak run com.visualstudio.code" +alias random="cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1" + +# Dev containers +export DEVC_REGISTRY="git.plabble.org/maurice" + +function devc() { + "$HOME/dev/devcontainer/devc.sh" "$@" -mdf +} + +alias rider="DEVC_COMMAND=/home/user/Rider/bin/rider devc rider -x11 -host-spawn -net" +alias flutter="devc flutter -x11 -host-spawn -kvm -usb -gpu" +alias androidstudio="DEVC_COMMAND=/home/user/AndroidStudio/bin/studio devc android -x11 -host-spawn -kvm -usb -gpu" + +function hx() { + arg="${1:-.}" + DEVC_COMMAND="hx $arg" devc fedora -mnt $arg +} + +# Git aliases +alias gc="git commit -m" +alias ga="git add -A" +alias gf="git fetch" +alias gp="git pull" +alias gpp="git push" +alias gs="git status" -- 2.54.0 From 212463c725be0467616f97582408f45d680e4730 Mon Sep 17 00:00:00 2001 From: maurice Date: Mon, 3 Nov 2025 13:02:57 +0100 Subject: [PATCH 16/40] Downgrade PHP --- containers/php/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/php/Containerfile b/containers/php/Containerfile index bb209a9..aeb8304 100644 --- a/containers/php/Containerfile +++ b/containers/php/Containerfile @@ -1,3 +1,3 @@ FROM git.plabble.org/maurice/fedora:main -RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/8.4)" \ No newline at end of file +RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/8.1)" \ No newline at end of file -- 2.54.0 From 3a50fff009b45237ce65917634e82a7e624cbf30 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 4 Nov 2025 09:20:46 +0100 Subject: [PATCH 17/40] Changes --- containers/php/Containerfile | 3 ++- containers/php/config.sh | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 containers/php/config.sh diff --git a/containers/php/Containerfile b/containers/php/Containerfile index aeb8304..a7fa550 100644 --- a/containers/php/Containerfile +++ b/containers/php/Containerfile @@ -1,3 +1,4 @@ FROM git.plabble.org/maurice/fedora:main +ARG php_version="8.1" # 8.4 is latest -RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/8.1)" \ No newline at end of file +RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/${php_version})" diff --git a/containers/php/config.sh b/containers/php/config.sh new file mode 100644 index 0000000..764f6c2 --- /dev/null +++ b/containers/php/config.sh @@ -0,0 +1,2 @@ +#!/bin/bash +arg "--cap-add=NET_BIND_SERVICE -p 80:80" -- 2.54.0 From 4608cea0de819465e42909ddf2a7a10e5c4df399 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 4 Nov 2025 09:23:50 +0100 Subject: [PATCH 18/40] allow manual trigger --- .gitea/workflows/fedora.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitea/workflows/fedora.yaml b/.gitea/workflows/fedora.yaml index 07d891a..99b47c7 100644 --- a/.gitea/workflows/fedora.yaml +++ b/.gitea/workflows/fedora.yaml @@ -1,5 +1,6 @@ name: Build container on: + workflow_dispatch: # This makes the workflow manually triggered push: branches: ["main"] paths: -- 2.54.0 From 7adaee8f06fb64709f4fc971303ca8ef131bf8a4 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 4 Nov 2025 09:26:32 +0100 Subject: [PATCH 19/40] on PR --- .gitea/workflows/fedora.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/fedora.yaml b/.gitea/workflows/fedora.yaml index 99b47c7..5cd58a5 100644 --- a/.gitea/workflows/fedora.yaml +++ b/.gitea/workflows/fedora.yaml @@ -9,7 +9,9 @@ on: - "containers/rust/**" - "containers/php/**" - ".gitea/workflows/fedora.yaml" - + pull_request: + branches: ["main"] + jobs: fedora-build: runs-on: job-latest -- 2.54.0 From 28843cdb89e80f3d9ae96198c8fa7d198c530305 Mon Sep 17 00:00:00 2001 From: maurice Date: Wed, 26 Nov 2025 13:40:39 +0100 Subject: [PATCH 20/40] Updates --- containers/dotnet/Containerfile | 2 +- containers/fedora/Containerfile | 1 - containers/rider/Containerfile | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/containers/dotnet/Containerfile b/containers/dotnet/Containerfile index edc8351..7825c4c 100644 --- a/containers/dotnet/Containerfile +++ b/containers/dotnet/Containerfile @@ -1,7 +1,7 @@ FROM git.plabble.org/maurice/fedora:main USER root -RUN dnf -y install dotnet-sdk-9.0 +RUN dnf -y install dotnet-sdk-9.0 dotnet-sdk-10.0 COPY install-roslyn.sh /tmp/install-roslyn.sh RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index f1efba5..4287d83 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -2,7 +2,6 @@ FROM quay.io/fedora/fedora:43 # === install system packages === RUN dnf update -y && \ - dnf copr enable -y atim/lazygit && \ dnf -y install procps ping bash-completion glibc-langpack-en \ host-spawn dbus-launch \ git pnpm helix zip diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile index 3af1ef6..d7675ee 100644 --- a/containers/rider/Containerfile +++ b/containers/rider/Containerfile @@ -1,5 +1,5 @@ FROM git.plabble.org/maurice/dotnet:main -ARG rider_version="2025.2.4" +ARG rider_version="2025.3.0.2" ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" USER root -- 2.54.0 From efe72f205d38e1e41c78669703d9452db57a5b08 Mon Sep 17 00:00:00 2001 From: maurice Date: Wed, 3 Dec 2025 19:56:25 +0100 Subject: [PATCH 21/40] Update --- .gitea/workflows/other.yaml | 18 +++++++++--------- containers/fedora/config.sh | 2 +- containers/php/Containerfile | 2 +- containers/rider/Containerfile | 2 +- 4 files changed, 12 insertions(+), 12 deletions(-) diff --git a/.gitea/workflows/other.yaml b/.gitea/workflows/other.yaml index 129685a..3828eb6 100644 --- a/.gitea/workflows/other.yaml +++ b/.gitea/workflows/other.yaml @@ -37,12 +37,12 @@ jobs: build-args: TAG=${{ github.ref_name }} outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - name: Build and push Flutter container - uses: docker/build-push-action@v5 - with: - context: ./containers/flutter - file: ./containers/flutter/Containerfile - push: true - tags: git.plabble.org/maurice/flutter:${{ github.ref_name }} - build-args: TAG=${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true \ No newline at end of file + # - name: Build and push Flutter container + # uses: docker/build-push-action@v5 + # with: + # context: ./containers/flutter + # file: ./containers/flutter/Containerfile + # push: true + # tags: git.plabble.org/maurice/flutter:${{ github.ref_name }} + # build-args: TAG=${{ github.ref_name }} + # outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true \ No newline at end of file diff --git a/containers/fedora/config.sh b/containers/fedora/config.sh index c7cfb14..70ff6b5 100644 --- a/containers/fedora/config.sh +++ b/containers/fedora/config.sh @@ -1,2 +1,2 @@ #!/bin/bash -arg "-p 8080:8080" +arg "-p 5173:5173 --network dev-php" diff --git a/containers/php/Containerfile b/containers/php/Containerfile index a7fa550..9d46528 100644 --- a/containers/php/Containerfile +++ b/containers/php/Containerfile @@ -1,4 +1,4 @@ FROM git.plabble.org/maurice/fedora:main -ARG php_version="8.1" # 8.4 is latest +ARG php_version="8.5" RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/${php_version})" diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile index d7675ee..7bcb6be 100644 --- a/containers/rider/Containerfile +++ b/containers/rider/Containerfile @@ -1,5 +1,5 @@ FROM git.plabble.org/maurice/dotnet:main -ARG rider_version="2025.3.0.2" +ARG rider_version="2025.3.0.3" ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" USER root -- 2.54.0 From b012abc3ed3304fa8203f299d1665d2183aeb4eb Mon Sep 17 00:00:00 2001 From: Job79 Date: Mon, 29 Dec 2025 17:09:24 +0100 Subject: [PATCH 22/40] ci: move ci to job v2 --- .gitea/workflows/build.yaml | 111 +++++++++++++++++++++++++++++++++++ .gitea/workflows/fedora.yaml | 68 --------------------- .gitea/workflows/other.yaml | 58 ++++++++---------- 3 files changed, 136 insertions(+), 101 deletions(-) create mode 100644 .gitea/workflows/build.yaml delete mode 100644 .gitea/workflows/fedora.yaml diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml new file mode 100644 index 0000000..f174244 --- /dev/null +++ b/.gitea/workflows/build.yaml @@ -0,0 +1,111 @@ +name: Build containers +on: + workflow_dispatch: + push: + branches: ["main"] + paths: ["containers/**", ".gitea/workflows/build.yaml"] + pull_request: + branches: ["main"] + paths: ["containers/**", ".gitea/workflows/build.yaml"] + +jobs: + changes: + runs-on: job-v2 + outputs: + any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} + fedora: ${{ steps.filter.outputs.fedora == 'true' }} + php: ${{ steps.filter.outputs.php == 'true' }} + rust: ${{ steps.filter.outputs.rust == 'true' }} + dotnet: ${{ steps.filter.outputs.dotnet == 'true' }} + steps: + - uses: actions/checkout@v4 + - uses: https://github.com/dorny/paths-filter@v3 + id: filter + with: + filters: | + workflow: ['.gitea/workflows/build.yaml'] + fedora: ['containers/fedora/**'] + php: ['containers/php/**'] + rust: ['containers/rust/**'] + dotnet: ['containers/dotnet/**'] + + base-image: + needs: [changes] + if: ${{ needs.changes.outputs.fedora == 'true' || needs.changes.outputs.any_change == 'true' }} + runs-on: job-v2 + steps: + - uses: actions/checkout@v4 + - name: Log in + uses: redhat-actions/podman-login@v1 + with: + registry: git.plabble.org + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + - name: Build + id: build + uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef + with: + image: maurice/fedora + tags: ${{ github.ref_name }} + context: ./containers/fedora + containerfiles: ./containers/fedora/Containerfile + - name: Push + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build.outputs.image }} + tags: ${{ steps.build.outputs.tags }} + registry: git.plabble.org + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + extra-args: | + --compression-format=zstd + --compression-level=12 + + dependent-images: + needs: [changes, base-image] + 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: [php, rust, dotnet] + steps: + - name: Check if build needed + id: check + run: | + if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + if [[ "${{ matrix.container }}" == "rust" && "${{ needs.changes.outputs.rust }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + if [[ "${{ matrix.container }}" == "dotnet" && "${{ needs.changes.outputs.dotnet }}" == "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 + - name: Log in + if: steps.check.outputs.run == 'true' + uses: redhat-actions/podman-login@v1 + with: + registry: git.plabble.org + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + - name: Build + id: build + if: steps.check.outputs.run == 'true' + uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef + with: + image: maurice/${{ matrix.container }} + tags: ${{ github.ref_name }} + context: ./containers/${{ matrix.container }} + containerfiles: ./containers/${{ matrix.container }}/Containerfile + build-args: TAG=${{ github.ref_name }} + - name: Push + if: steps.check.outputs.run == 'true' + uses: redhat-actions/push-to-registry@v2 + with: + image: ${{ steps.build.outputs.image }} + tags: ${{ steps.build.outputs.tags }} + registry: git.plabble.org + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + extra-args: | + --compression-format=zstd + --compression-level=12 diff --git a/.gitea/workflows/fedora.yaml b/.gitea/workflows/fedora.yaml deleted file mode 100644 index 5cd58a5..0000000 --- a/.gitea/workflows/fedora.yaml +++ /dev/null @@ -1,68 +0,0 @@ -name: Build container -on: - workflow_dispatch: # This makes the workflow manually triggered - push: - branches: ["main"] - paths: - - "containers/fedora/**" - - "containers/dotnet/**" - - "containers/rust/**" - - "containers/php/**" - - ".gitea/workflows/fedora.yaml" - pull_request: - branches: ["main"] - -jobs: - fedora-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 Fedora container - uses: docker/build-push-action@v5 - with: - context: ./containers/fedora - file: ./containers/fedora/Containerfile - push: true - tags: git.plabble.org/maurice/fedora:${{ github.ref_name }} - build-args: TAG=${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - - name: Build and push Rust container - uses: docker/build-push-action@v5 - with: - context: ./containers/rust - file: ./containers/rust/Containerfile - push: true - tags: git.plabble.org/maurice/rust:${{ github.ref_name }} - build-args: TAG=${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - - name: Build and push PHP container - uses: docker/build-push-action@v5 - with: - context: ./containers/php - file: ./containers/php/Containerfile - push: true - tags: git.plabble.org/maurice/php:${{ github.ref_name }} - build-args: TAG=${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - - name: Build and push C# container - uses: docker/build-push-action@v5 - with: - context: ./containers/dotnet - file: ./containers/dotnet/Containerfile - push: true - tags: git.plabble.org/maurice/dotnet:${{ github.ref_name }} - build-args: TAG=${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true diff --git a/.gitea/workflows/other.yaml b/.gitea/workflows/other.yaml index 3828eb6..bab6cfc 100644 --- a/.gitea/workflows/other.yaml +++ b/.gitea/workflows/other.yaml @@ -1,48 +1,40 @@ name: Build optional dev containers on: - workflow_dispatch: # This makes the workflow manually triggered + workflow_dispatch: jobs: fedora-build: - runs-on: job-latest + runs-on: job-v2 + strategy: + max-parallel: 1 + matrix: + container: [rider, android] 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 + - name: Log in + uses: redhat-actions/podman-login@v1 with: registry: git.plabble.org username: ${{ secrets.REGISTRY_USERNAME }} password: ${{ secrets.REGISTRY_TOKEN }} - - - name: Build and push Rider container - uses: docker/build-push-action@v5 + - name: Build ${{ matrix.container }} container + id: build_image + uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef with: - context: ./containers/rider - file: ./containers/rider/Containerfile - push: true - tags: git.plabble.org/maurice/rider:${{ github.ref_name }} + image: maurice/${{ matrix.container }} + tags: ${{ github.ref_name }} + context: ./containers/${{ matrix.container }} + containerfiles: ./containers/${{ matrix.container }}/Containerfile build-args: TAG=${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - - name: Build and push Android Studio container - uses: docker/build-push-action@v5 + - name: Push ${{ matrix.container }} container + uses: redhat-actions/push-to-registry@v2 with: - context: ./containers/android - file: ./containers/android/Containerfile - push: true - tags: git.plabble.org/maurice/android:${{ github.ref_name }} - build-args: TAG=${{ github.ref_name }} - outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true - - # - name: Build and push Flutter container - # uses: docker/build-push-action@v5 - # with: - # context: ./containers/flutter - # file: ./containers/flutter/Containerfile - # push: true - # tags: git.plabble.org/maurice/flutter:${{ github.ref_name }} - # build-args: TAG=${{ github.ref_name }} - # outputs: type=image,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true \ No newline at end of file + image: ${{ steps.build_image.outputs.image }} + tags: ${{ steps.build_image.outputs.tags }} + registry: git.plabble.org + username: ${{ secrets.REGISTRY_USERNAME }} + password: ${{ secrets.REGISTRY_TOKEN }} + extra-args: | + --compression-format=zstd + --compression-level=12 -- 2.54.0 From 314e269881ec07b2899b597482f50cc00e9297e3 Mon Sep 17 00:00:00 2001 From: Job79 Date: Mon, 29 Dec 2025 17:10:28 +0100 Subject: [PATCH 23/40] fix: cache dnf installs (and remove cache from images) --- containers/android/Containerfile | 6 ++++-- containers/dotnet/Containerfile | 5 +++-- containers/fedora/Containerfile | 7 ++++--- containers/rider/Containerfile | 5 +++-- 4 files changed, 14 insertions(+), 9 deletions(-) diff --git a/containers/android/Containerfile b/containers/android/Containerfile index 14b2431..ad61e86 100644 --- a/containers/android/Containerfile +++ b/containers/android/Containerfile @@ -3,7 +3,9 @@ ARG studio_version="2025.1.4.8" ARG download_uri="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${studio_version}/android-studio-${studio_version}-linux.tar.gz" USER root -RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU + +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU USER user RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \ @@ -15,4 +17,4 @@ RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \ RUN echo 'alias studio="$HOME/AndroidStudio/bin/studio"' >> /home/user/.bashrc RUN echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> /home/user/.bashrc -RUN echo 'export PATH="$ANDROID_HOME/platform-tools:$PATH"' >> /home/user/.bashrc \ No newline at end of file +RUN echo 'export PATH="$ANDROID_HOME/platform-tools:$PATH"' >> /home/user/.bashrc diff --git a/containers/dotnet/Containerfile b/containers/dotnet/Containerfile index 7825c4c..0d95101 100644 --- a/containers/dotnet/Containerfile +++ b/containers/dotnet/Containerfile @@ -1,10 +1,11 @@ FROM git.plabble.org/maurice/fedora:main USER root -RUN dnf -y install dotnet-sdk-9.0 dotnet-sdk-10.0 +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf -y --setopt=keepcache=1 install dotnet-sdk-9.0 dotnet-sdk-10.0 COPY install-roslyn.sh /tmp/install-roslyn.sh RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh USER user -RUN dotnet tool install --global dotnet-ef \ No newline at end of file +RUN dotnet tool install --global dotnet-ef diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index 4287d83..cd04c62 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -1,10 +1,11 @@ FROM quay.io/fedora/fedora:43 # === install system packages === -RUN dnf update -y && \ - dnf -y install procps ping bash-completion glibc-langpack-en \ +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf update -y && \ + dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \ host-spawn dbus-launch \ - git pnpm helix zip + git pnpm helix zip # === setup user === RUN useradd -ms /bin/bash user && \ diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile index 7bcb6be..44c9b39 100644 --- a/containers/rider/Containerfile +++ b/containers/rider/Containerfile @@ -3,7 +3,8 @@ ARG rider_version="2025.3.0.3" ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" USER root -RUN dnf -y install libXext libXrender libXtst libX11 freetype freetype-devel +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel USER user RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \ @@ -12,4 +13,4 @@ RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \ rm /tmp/rider.tar.gz && \ mv /home/user/Rider/JetBrains*/* /home/user/Rider -RUN echo 'alias rider="$HOME/Rider/bin/rider"' >> /home/user/.bashrc \ No newline at end of file +RUN echo 'alias rider="$HOME/Rider/bin/rider"' >> /home/user/.bashrc -- 2.54.0 From ae8a5ec260467af7a1856a07a1e3633233c07289 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 27 Jan 2026 19:29:30 +0100 Subject: [PATCH 24/40] Update container --- containers/rust/Containerfile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/containers/rust/Containerfile b/containers/rust/Containerfile index 8606a66..b0680bb 100644 --- a/containers/rust/Containerfile +++ b/containers/rust/Containerfile @@ -1,4 +1,8 @@ FROM git.plabble.org/maurice/fedora:main RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer \ No newline at end of file +RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer + +# Raspberry Pi Pico tools +RUN cargo install elf2uf2-rs --locked +RUN rustup target add thumbv6m-none-eabi -- 2.54.0 From c618572a18b6e2ccdc504100f0708ecea66d9963 Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 27 Jan 2026 19:33:29 +0100 Subject: [PATCH 25/40] Fix --- containers/rust/Containerfile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/containers/rust/Containerfile b/containers/rust/Containerfile index b0680bb..e9c23b0 100644 --- a/containers/rust/Containerfile +++ b/containers/rust/Containerfile @@ -4,5 +4,9 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer # Raspberry Pi Pico tools -RUN cargo install elf2uf2-rs --locked -RUN rustup target add thumbv6m-none-eabi +RUN sudo dnf install -y \ + systemd-devel \ + pkg-config \ + && dnf clean all +RUN . "$HOME/.cargo/env" && cargo install elf2uf2-rs --locked +RUN . "$HOME/.cargo/env" && rustup target add thumbv6m-none-eabi -- 2.54.0 From c49270c7cf87ddaeb8dc9e046ff965066bc5aede Mon Sep 17 00:00:00 2001 From: maurice Date: Tue, 27 Jan 2026 19:36:02 +0100 Subject: [PATCH 26/40] update --- .gitea/workflows/fedora.yaml | 2 +- .gitea/workflows/other.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.gitea/workflows/fedora.yaml b/.gitea/workflows/fedora.yaml index 5cd58a5..880a40a 100644 --- a/.gitea/workflows/fedora.yaml +++ b/.gitea/workflows/fedora.yaml @@ -14,7 +14,7 @@ on: jobs: fedora-build: - runs-on: job-latest + runs-on: job-v2 steps: - name: Clone repo uses: actions/checkout@v4 diff --git a/.gitea/workflows/other.yaml b/.gitea/workflows/other.yaml index 3828eb6..45e6bc4 100644 --- a/.gitea/workflows/other.yaml +++ b/.gitea/workflows/other.yaml @@ -4,7 +4,7 @@ on: jobs: fedora-build: - runs-on: job-latest + runs-on: job-v2 steps: - name: Clone repo uses: actions/checkout@v4 -- 2.54.0 From 3cdacc7eb87eba5145884ce58a2ab2cf344d5674 Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 29 Jan 2026 19:04:55 +0100 Subject: [PATCH 27/40] Updates --- containers/dotnet/install-roslyn.sh | 2 +- containers/fedora/Containerfile | 2 +- containers/rider/Containerfile | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/containers/dotnet/install-roslyn.sh b/containers/dotnet/install-roslyn.sh index 2ab3518..865c354 100644 --- a/containers/dotnet/install-roslyn.sh +++ b/containers/dotnet/install-roslyn.sh @@ -1,5 +1,5 @@ #!/bin/bash -version="v1.39.15-beta.60" +version="v1.39.15" arch="linux-x64" link="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$arch-net6.0.tar.gz" diff --git a/containers/fedora/Containerfile b/containers/fedora/Containerfile index cd04c62..43332e8 100644 --- a/containers/fedora/Containerfile +++ b/containers/fedora/Containerfile @@ -5,7 +5,7 @@ RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ dnf update -y && \ dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \ host-spawn dbus-launch \ - git pnpm helix zip + git pnpm helix zip rsync # === setup user === RUN useradd -ms /bin/bash user && \ diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile index 44c9b39..ad47b70 100644 --- a/containers/rider/Containerfile +++ b/containers/rider/Containerfile @@ -1,5 +1,5 @@ FROM git.plabble.org/maurice/dotnet:main -ARG rider_version="2025.3.0.3" +ARG rider_version="2025.3.2" ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" USER root -- 2.54.0 From ba73361a8f8ffc29aee16ad7a8e537214863cd1d Mon Sep 17 00:00:00 2001 From: maurice Date: Wed, 18 Feb 2026 12:28:58 +0100 Subject: [PATCH 28/40] Kali image --- .gitea/workflows/other.yaml | 2 +- containers/kali/Containerfile | 4 ++++ containers/kali/start.sh | 2 ++ 3 files changed, 7 insertions(+), 1 deletion(-) create mode 100644 containers/kali/Containerfile create mode 100644 containers/kali/start.sh diff --git a/.gitea/workflows/other.yaml b/.gitea/workflows/other.yaml index bab6cfc..4c0d18f 100644 --- a/.gitea/workflows/other.yaml +++ b/.gitea/workflows/other.yaml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 1 matrix: - container: [rider, android] + container: [rider, kali, android] steps: - name: Clone repo uses: actions/checkout@v4 diff --git a/containers/kali/Containerfile b/containers/kali/Containerfile new file mode 100644 index 0000000..60bcb13 --- /dev/null +++ b/containers/kali/Containerfile @@ -0,0 +1,4 @@ +FROM kalilinux/kali-rolling + +RUN apt update && apt -y install kali-linux-headless +VOLUME /root \ No newline at end of file diff --git a/containers/kali/start.sh b/containers/kali/start.sh new file mode 100644 index 0000000..abde266 --- /dev/null +++ b/containers/kali/start.sh @@ -0,0 +1,2 @@ +#!/bin/sh +arg "-v kali-root:/root" \ No newline at end of file -- 2.54.0 From 0f0842c9b4bb5d9d3e7995e3b49808e08455af26 Mon Sep 17 00:00:00 2001 From: maurice Date: Wed, 18 Feb 2026 12:31:41 +0100 Subject: [PATCH 29/40] Docker prefix --- containers/kali/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/kali/Containerfile b/containers/kali/Containerfile index 60bcb13..e285302 100644 --- a/containers/kali/Containerfile +++ b/containers/kali/Containerfile @@ -1,4 +1,4 @@ -FROM kalilinux/kali-rolling +FROM docker.io/kalilinux/kali-rolling RUN apt update && apt -y install kali-linux-headless VOLUME /root \ No newline at end of file -- 2.54.0 From 21cbf0d21299495a1c2530d2f45d556524d07147 Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 19 Feb 2026 17:43:02 +0100 Subject: [PATCH 30/40] Go devc --- .gitea/workflows/build.yaml | 8 ++++---- .gitea/workflows/other.yaml | 2 +- containers/go/Containerfile | 7 +++++++ containers/kali/Containerfile | 4 ---- containers/kali/start.sh | 2 -- containers/php/Containerfile | 4 ---- containers/php/config.sh | 2 -- 7 files changed, 12 insertions(+), 17 deletions(-) create mode 100644 containers/go/Containerfile delete mode 100644 containers/kali/Containerfile delete mode 100644 containers/kali/start.sh delete mode 100644 containers/php/Containerfile delete mode 100644 containers/php/config.sh diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index f174244..22886d9 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -14,7 +14,7 @@ jobs: outputs: any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} fedora: ${{ steps.filter.outputs.fedora == 'true' }} - php: ${{ steps.filter.outputs.php == 'true' }} + go: ${{ steps.filter.outputs.go == 'true' }} rust: ${{ steps.filter.outputs.rust == 'true' }} dotnet: ${{ steps.filter.outputs.dotnet == 'true' }} steps: @@ -25,7 +25,7 @@ jobs: filters: | workflow: ['.gitea/workflows/build.yaml'] fedora: ['containers/fedora/**'] - php: ['containers/php/**'] + go: ['containers/go/**'] rust: ['containers/rust/**'] dotnet: ['containers/dotnet/**'] @@ -68,12 +68,12 @@ jobs: strategy: fail-fast: false matrix: - container: [php, rust, dotnet] + container: [rust, dotnet, go] steps: - name: Check if build needed id: check run: | - if [[ "${{ matrix.container }}" == "php" && "${{ needs.changes.outputs.php }}" == "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 }}" == "rust" && "${{ needs.changes.outputs.rust }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi if [[ "${{ matrix.container }}" == "dotnet" && "${{ needs.changes.outputs.dotnet }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi if [[ "${{ needs.changes.outputs.any_change }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi diff --git a/.gitea/workflows/other.yaml b/.gitea/workflows/other.yaml index 4c0d18f..6b15d84 100644 --- a/.gitea/workflows/other.yaml +++ b/.gitea/workflows/other.yaml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 1 matrix: - container: [rider, kali, android] + container: [rider] steps: - name: Clone repo uses: actions/checkout@v4 diff --git a/containers/go/Containerfile b/containers/go/Containerfile new file mode 100644 index 0000000..9275aa2 --- /dev/null +++ b/containers/go/Containerfile @@ -0,0 +1,7 @@ +FROM git.plabble.org/maurice/fedora:main + +USER root +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf -y --setopt=keepcache=1 install go + +USER user \ No newline at end of file diff --git a/containers/kali/Containerfile b/containers/kali/Containerfile deleted file mode 100644 index e285302..0000000 --- a/containers/kali/Containerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM docker.io/kalilinux/kali-rolling - -RUN apt update && apt -y install kali-linux-headless -VOLUME /root \ No newline at end of file diff --git a/containers/kali/start.sh b/containers/kali/start.sh deleted file mode 100644 index abde266..0000000 --- a/containers/kali/start.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/sh -arg "-v kali-root:/root" \ No newline at end of file diff --git a/containers/php/Containerfile b/containers/php/Containerfile deleted file mode 100644 index 9d46528..0000000 --- a/containers/php/Containerfile +++ /dev/null @@ -1,4 +0,0 @@ -FROM git.plabble.org/maurice/fedora:main -ARG php_version="8.5" - -RUN /bin/bash -c "export TERM=xterm && $(curl -fsSL https://php.new/install/linux/${php_version})" diff --git a/containers/php/config.sh b/containers/php/config.sh deleted file mode 100644 index 764f6c2..0000000 --- a/containers/php/config.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -arg "--cap-add=NET_BIND_SERVICE -p 80:80" -- 2.54.0 From 9f435b6a307337e9a8d48a1cd3089a88df366640 Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 10:45:13 +0100 Subject: [PATCH 31/40] Nieuwe networks --- containers/fedora/config.sh | 2 -- containers/go/Containerfile | 2 ++ containers/rider/config.sh | 3 +-- containers/rust/Containerfile | 24 ++++++++++++++++++------ containers/rust/config.sh | 2 ++ devc.sh | 5 +++-- 6 files changed, 26 insertions(+), 12 deletions(-) delete mode 100644 containers/fedora/config.sh create mode 100644 containers/rust/config.sh diff --git a/containers/fedora/config.sh b/containers/fedora/config.sh deleted file mode 100644 index 70ff6b5..0000000 --- a/containers/fedora/config.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -arg "-p 5173:5173 --network dev-php" diff --git a/containers/go/Containerfile b/containers/go/Containerfile index 9275aa2..f6591e8 100644 --- a/containers/go/Containerfile +++ b/containers/go/Containerfile @@ -4,4 +4,6 @@ USER root RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ dnf -y --setopt=keepcache=1 install go +RUN go install golang.org/x/tools/gopls@latest + USER user \ No newline at end of file diff --git a/containers/rider/config.sh b/containers/rider/config.sh index d0e2d31..98a5e1c 100644 --- a/containers/rider/config.sh +++ b/containers/rider/config.sh @@ -1,3 +1,2 @@ #!/bin/bash -arg "-p 8080:8080" -arg "-p 8081:8081" +arg "-p 8888:8888" \ No newline at end of file diff --git a/containers/rust/Containerfile b/containers/rust/Containerfile index e9c23b0..4622c98 100644 --- a/containers/rust/Containerfile +++ b/containers/rust/Containerfile @@ -1,12 +1,24 @@ FROM git.plabble.org/maurice/fedora:main +USER root + +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf -y --setopt=keepcache=1 install openssl-devel \ + gcc-c++ libX11-devel alsa-lib-devel systemd-devel wayland-devel libxkbcommon-devel mesa-vulkan-drivers + +USER user + RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer # Raspberry Pi Pico tools -RUN sudo dnf install -y \ - systemd-devel \ - pkg-config \ - && dnf clean all -RUN . "$HOME/.cargo/env" && cargo install elf2uf2-rs --locked -RUN . "$HOME/.cargo/env" && rustup target add thumbv6m-none-eabi +# RUN sudo dnf install -y \ +# systemd-devel \ +# pkg-config \ +# && dnf clean all +# RUN . "$HOME/.cargo/env" && cargo install elf2uf2-rs --locked +# RUN . "$HOME/.cargo/env" && rustup target add thumbv6m-none-eabi + +# WASM toolchain +RUN curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh +RUN cargo install cargo-generate \ No newline at end of file diff --git a/containers/rust/config.sh b/containers/rust/config.sh new file mode 100644 index 0000000..67817c7 --- /dev/null +++ b/containers/rust/config.sh @@ -0,0 +1,2 @@ +#!/bin/bash +arg "--device=/dev/bus/usb --privileged" \ No newline at end of file diff --git a/devc.sh b/devc.sh index 24cbb68..98ae201 100755 --- a/devc.sh +++ b/devc.sh @@ -57,8 +57,8 @@ param_args() { arg "-v /run/user/$UID/bus:/tmp/bus" arg "-e HOST_HOME=$HOME" # Used to translate paths. ;; - -net) # Enable network dev- - arg "--network dev-$name" + -net) # Enable network 'dev-'' and 'devc' + arg "--network dev-$name --network devc" ;; -mnt) # Mount directory. shift @@ -117,6 +117,7 @@ fi if [ "$(podman container inspect "$name" -f {{.State.Running}} 2>&1)" != 'true' ] || [[ $# -gt 0 ]]; then log "starting devcontainer..." podman network create --ignore "dev-$name" + podman network create --ignore "devc" podman container rm -f -t 0 "$name" 1>/dev/null podman run -td $(default_args) $(param_args $@) "$registry/$image" fi -- 2.54.0 From 53e0b19ccb5e5c4707a198eb2dfc2183666a2fe5 Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 14:43:34 +0100 Subject: [PATCH 32/40] Updates --- .gitea/workflows/build.yaml | 109 +++++++++--------- containers/android/Containerfile | 6 +- containers/{fedora => base}/Containerfile | 25 +++- containers/{fedora => base}/config/bashrc | 0 containers/{fedora => base}/config/bin/host | 0 containers/{fedora => base}/config/git | 0 .../{fedora => base}/config/helix/config.toml | 0 .../config/helix/languages.toml | 0 containers/{dotnet => base}/install-roslyn.sh | 0 containers/dotnet/Containerfile | 11 -- containers/flutter/Containerfile | 4 +- containers/go/Containerfile | 9 -- containers/rider/Containerfile | 4 +- containers/rider/config.sh | 4 +- containers/rust/Containerfile | 24 ---- containers/rust/config.sh | 2 - 16 files changed, 85 insertions(+), 113 deletions(-) rename containers/{fedora => base}/Containerfile (55%) rename containers/{fedora => base}/config/bashrc (100%) rename containers/{fedora => base}/config/bin/host (100%) rename containers/{fedora => base}/config/git (100%) rename containers/{fedora => base}/config/helix/config.toml (100%) rename containers/{fedora => base}/config/helix/languages.toml (100%) rename containers/{dotnet => base}/install-roslyn.sh (100%) delete mode 100644 containers/dotnet/Containerfile delete mode 100644 containers/go/Containerfile delete mode 100644 containers/rust/Containerfile delete mode 100644 containers/rust/config.sh diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 22886d9..52ce04e 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -24,14 +24,11 @@ jobs: with: filters: | workflow: ['.gitea/workflows/build.yaml'] - fedora: ['containers/fedora/**'] - go: ['containers/go/**'] - rust: ['containers/rust/**'] - dotnet: ['containers/dotnet/**'] + base: ['containers/base/**'] base-image: needs: [changes] - if: ${{ needs.changes.outputs.fedora == 'true' || needs.changes.outputs.any_change == 'true' }} + if: ${{ needs.changes.outputs.base == 'true' || needs.changes.outputs.any_change == 'true' }} runs-on: job-v2 steps: - uses: actions/checkout@v4 @@ -45,10 +42,10 @@ jobs: id: build uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef with: - image: maurice/fedora + image: maurice/base tags: ${{ github.ref_name }} - context: ./containers/fedora - containerfiles: ./containers/fedora/Containerfile + context: ./containers/base + containerfiles: ./containers/base/Containerfile - name: Push uses: redhat-actions/push-to-registry@v2 with: @@ -61,51 +58,51 @@ jobs: --compression-format=zstd --compression-level=12 - dependent-images: - needs: [changes, base-image] - 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: [rust, dotnet, go] - steps: - - name: Check if build needed - id: check - run: | - if [[ "${{ matrix.container }}" == "go" && "${{ needs.changes.outputs.go }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi - if [[ "${{ matrix.container }}" == "rust" && "${{ needs.changes.outputs.rust }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi - if [[ "${{ matrix.container }}" == "dotnet" && "${{ needs.changes.outputs.dotnet }}" == "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 - - name: Log in - if: steps.check.outputs.run == 'true' - uses: redhat-actions/podman-login@v1 - with: - registry: git.plabble.org - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_TOKEN }} - - name: Build - id: build - if: steps.check.outputs.run == 'true' - uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef - with: - image: maurice/${{ matrix.container }} - tags: ${{ github.ref_name }} - context: ./containers/${{ matrix.container }} - containerfiles: ./containers/${{ matrix.container }}/Containerfile - build-args: TAG=${{ github.ref_name }} - - name: Push - if: steps.check.outputs.run == 'true' - uses: redhat-actions/push-to-registry@v2 - with: - image: ${{ steps.build.outputs.image }} - tags: ${{ steps.build.outputs.tags }} - registry: git.plabble.org - username: ${{ secrets.REGISTRY_USERNAME }} - password: ${{ secrets.REGISTRY_TOKEN }} - extra-args: | - --compression-format=zstd - --compression-level=12 + # dependent-images: + # needs: [changes, base-image] + # 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: [rust, dotnet, go] + # steps: + # - name: Check if build needed + # id: check + # run: | + # if [[ "${{ matrix.container }}" == "go" && "${{ needs.changes.outputs.go }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + # if [[ "${{ matrix.container }}" == "rust" && "${{ needs.changes.outputs.rust }}" == "true" ]]; then echo "run=true" >> $GITHUB_OUTPUT; fi + # if [[ "${{ matrix.container }}" == "dotnet" && "${{ needs.changes.outputs.dotnet }}" == "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 + # - name: Log in + # if: steps.check.outputs.run == 'true' + # uses: redhat-actions/podman-login@v1 + # with: + # registry: git.plabble.org + # username: ${{ secrets.REGISTRY_USERNAME }} + # password: ${{ secrets.REGISTRY_TOKEN }} + # - name: Build + # id: build + # if: steps.check.outputs.run == 'true' + # uses: job79/buildah-build@65b3793a1370c1ccd74a5c0d090d70eb9637a4ef + # with: + # image: maurice/${{ matrix.container }} + # tags: ${{ github.ref_name }} + # context: ./containers/${{ matrix.container }} + # containerfiles: ./containers/${{ matrix.container }}/Containerfile + # build-args: TAG=${{ github.ref_name }} + # - name: Push + # if: steps.check.outputs.run == 'true' + # uses: redhat-actions/push-to-registry@v2 + # with: + # image: ${{ steps.build.outputs.image }} + # tags: ${{ steps.build.outputs.tags }} + # registry: git.plabble.org + # username: ${{ secrets.REGISTRY_USERNAME }} + # password: ${{ secrets.REGISTRY_TOKEN }} + # extra-args: | + # --compression-format=zstd + # --compression-level=12 diff --git a/containers/android/Containerfile b/containers/android/Containerfile index ad61e86..95ece7a 100644 --- a/containers/android/Containerfile +++ b/containers/android/Containerfile @@ -1,9 +1,9 @@ -FROM git.plabble.org/maurice/dotnet:main -ARG studio_version="2025.1.4.8" +FROM git.plabble.org/maurice/base:main +ARG studio_version="2025.3.2.6" ARG download_uri="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${studio_version}/android-studio-${studio_version}-linux.tar.gz" USER root - +# === setup GUI === RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU USER user diff --git a/containers/fedora/Containerfile b/containers/base/Containerfile similarity index 55% rename from containers/fedora/Containerfile rename to containers/base/Containerfile index 43332e8..f179d65 100644 --- a/containers/fedora/Containerfile +++ b/containers/base/Containerfile @@ -3,10 +3,12 @@ FROM quay.io/fedora/fedora:43 # === install system packages === RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ dnf update -y && \ - dnf -y --setopt=keepcache=1 install procps ping bash-completion glibc-langpack-en \ + dnf -y --setopt=keepcache=1 install \ + procps ping bash-completion glibc-langpack-en \ host-spawn dbus-launch \ - git pnpm helix zip rsync - + git pnpm helix zip rsync \ + dotnet-sdk-9.0 dotnet-sdk-10.0 go + # === setup user === RUN useradd -ms /bin/bash user && \ usermod -aG wheel user && sed -i '/NOPASSWD/s/^#//g' /etc/sudoers && \ @@ -15,6 +17,11 @@ RUN useradd -ms /bin/bash user && \ # === Add host entry for podman === RUN ln -s /usr/local/bin/host /usr/local/bin/podman +# === root language servers === +COPY install-roslyn.sh /tmp/install-roslyn.sh +RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh +RUN go install golang.org/x/tools/gopls@latest + USER user WORKDIR /home/user RUN mkdir .config .local .cache @@ -24,8 +31,18 @@ COPY --chown=user:user config/git .config/git/config COPY --chown=user:user config/helix/ .config/helix/ COPY config/bin /usr/local/bin -# === Setup PNPM & install language servers === +# === Setup PNPM & install language servers, tools === RUN /bin/bash -c "SHELL=/bin/bash pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ typescript typescript-language-server" +RUN dotnet tool install --global dotnet-ef + +# === Rust toolchain === +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y +RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer + +# WASM toolchain +RUN curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh +RUN cargo install cargo-generate + VOLUME /home/user diff --git a/containers/fedora/config/bashrc b/containers/base/config/bashrc similarity index 100% rename from containers/fedora/config/bashrc rename to containers/base/config/bashrc diff --git a/containers/fedora/config/bin/host b/containers/base/config/bin/host similarity index 100% rename from containers/fedora/config/bin/host rename to containers/base/config/bin/host diff --git a/containers/fedora/config/git b/containers/base/config/git similarity index 100% rename from containers/fedora/config/git rename to containers/base/config/git diff --git a/containers/fedora/config/helix/config.toml b/containers/base/config/helix/config.toml similarity index 100% rename from containers/fedora/config/helix/config.toml rename to containers/base/config/helix/config.toml diff --git a/containers/fedora/config/helix/languages.toml b/containers/base/config/helix/languages.toml similarity index 100% rename from containers/fedora/config/helix/languages.toml rename to containers/base/config/helix/languages.toml diff --git a/containers/dotnet/install-roslyn.sh b/containers/base/install-roslyn.sh similarity index 100% rename from containers/dotnet/install-roslyn.sh rename to containers/base/install-roslyn.sh diff --git a/containers/dotnet/Containerfile b/containers/dotnet/Containerfile deleted file mode 100644 index 0d95101..0000000 --- a/containers/dotnet/Containerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM git.plabble.org/maurice/fedora:main - -USER root -RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ - dnf -y --setopt=keepcache=1 install dotnet-sdk-9.0 dotnet-sdk-10.0 - -COPY install-roslyn.sh /tmp/install-roslyn.sh -RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh - -USER user -RUN dotnet tool install --global dotnet-ef diff --git a/containers/flutter/Containerfile b/containers/flutter/Containerfile index 50ec34f..36b1d2d 100644 --- a/containers/flutter/Containerfile +++ b/containers/flutter/Containerfile @@ -1,5 +1,5 @@ -FROM git.plabble.org/maurice/android:main -ARG flutter_version="3.35.7-stable" +FROM git.plabble.org/maurice/base:main +ARG flutter_version="3.41.4-stable" ARG download_uri="https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${flutter_version}.tar.xz" RUN mkdir /home/user/Flutter && \ diff --git a/containers/go/Containerfile b/containers/go/Containerfile deleted file mode 100644 index f6591e8..0000000 --- a/containers/go/Containerfile +++ /dev/null @@ -1,9 +0,0 @@ -FROM git.plabble.org/maurice/fedora:main - -USER root -RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ - dnf -y --setopt=keepcache=1 install go - -RUN go install golang.org/x/tools/gopls@latest - -USER user \ No newline at end of file diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile index ad47b70..ed6a24c 100644 --- a/containers/rider/Containerfile +++ b/containers/rider/Containerfile @@ -1,8 +1,10 @@ -FROM git.plabble.org/maurice/dotnet:main +FROM git.plabble.org/maurice/base:main ARG rider_version="2025.3.2" ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" USER root + +# === setup GUI === RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel USER user diff --git a/containers/rider/config.sh b/containers/rider/config.sh index 98a5e1c..e0535ed 100644 --- a/containers/rider/config.sh +++ b/containers/rider/config.sh @@ -1,2 +1,4 @@ #!/bin/bash -arg "-p 8888:8888" \ No newline at end of file +mkdir -p /tmp/joypet-sockets +arg "-p 7777:7777" +arg "-v /tmp/joypet-sockets:/var/run/joypet-sockets:Z" \ No newline at end of file diff --git a/containers/rust/Containerfile b/containers/rust/Containerfile deleted file mode 100644 index 4622c98..0000000 --- a/containers/rust/Containerfile +++ /dev/null @@ -1,24 +0,0 @@ -FROM git.plabble.org/maurice/fedora:main - -USER root - -RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ - dnf -y --setopt=keepcache=1 install openssl-devel \ - gcc-c++ libX11-devel alsa-lib-devel systemd-devel wayland-devel libxkbcommon-devel mesa-vulkan-drivers - -USER user - -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer - -# Raspberry Pi Pico tools -# RUN sudo dnf install -y \ -# systemd-devel \ -# pkg-config \ -# && dnf clean all -# RUN . "$HOME/.cargo/env" && cargo install elf2uf2-rs --locked -# RUN . "$HOME/.cargo/env" && rustup target add thumbv6m-none-eabi - -# WASM toolchain -RUN curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh -RUN cargo install cargo-generate \ No newline at end of file diff --git a/containers/rust/config.sh b/containers/rust/config.sh deleted file mode 100644 index 67817c7..0000000 --- a/containers/rust/config.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -arg "--device=/dev/bus/usb --privileged" \ No newline at end of file -- 2.54.0 From 3861cd471d22d3f00e2bfebf1a0361de6efeb50c Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 14:46:47 +0100 Subject: [PATCH 33/40] Fix? --- containers/base/Containerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/containers/base/Containerfile b/containers/base/Containerfile index f179d65..98353b1 100644 --- a/containers/base/Containerfile +++ b/containers/base/Containerfile @@ -42,7 +42,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer # WASM toolchain -RUN curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh -RUN cargo install cargo-generate +RUN . '/home/user/.cargo/env' && curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh +RUN . '/home/user/.cargo/env' && cargo install cargo-generate VOLUME /home/user -- 2.54.0 From 026513cfacab65eb1be8426cfcc8fd3bf1de82fb Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 15:07:16 +0100 Subject: [PATCH 34/40] aha --- .gitea/workflows/build.yaml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.gitea/workflows/build.yaml b/.gitea/workflows/build.yaml index 52ce04e..503e062 100644 --- a/.gitea/workflows/build.yaml +++ b/.gitea/workflows/build.yaml @@ -13,10 +13,7 @@ jobs: runs-on: job-v2 outputs: any_change: ${{ steps.filter.outputs.workflow == 'true' || github.event_name == 'schedule' || github.event_name == 'workflow_dispatch'}} - fedora: ${{ steps.filter.outputs.fedora == 'true' }} - go: ${{ steps.filter.outputs.go == 'true' }} - rust: ${{ steps.filter.outputs.rust == 'true' }} - dotnet: ${{ steps.filter.outputs.dotnet == 'true' }} + base: ${{ steps.filter.outputs.base == 'true' }} steps: - uses: actions/checkout@v4 - uses: https://github.com/dorny/paths-filter@v3 -- 2.54.0 From 945758530724f00ced8097651243a4a54201ebf0 Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 15:10:36 +0100 Subject: [PATCH 35/40] env --- containers/base/Containerfile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/containers/base/Containerfile b/containers/base/Containerfile index 98353b1..59ff2d0 100644 --- a/containers/base/Containerfile +++ b/containers/base/Containerfile @@ -4,7 +4,7 @@ FROM quay.io/fedora/fedora:43 RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ dnf update -y && \ dnf -y --setopt=keepcache=1 install \ - procps ping bash-completion glibc-langpack-en \ + procps ping bash-completion glibc-langpack-en openssl-devel \ host-spawn dbus-launch \ git pnpm helix zip rsync \ dotnet-sdk-9.0 dotnet-sdk-10.0 go @@ -36,13 +36,14 @@ RUN /bin/bash -c "SHELL=/bin/bash pnpm setup && . /home/user/.bashrc && pnpm i - typescript typescript-language-server" RUN dotnet tool install --global dotnet-ef +RUN echo 'export PATH="$PATH:/home/user/.dotnet/tools:/home/user/.cargo/env"' >> /home/user/.bashrc # === Rust toolchain === RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -RUN . '/home/user/.cargo/env' && rustup component add rust-analyzer +RUN . /home/user/.bashrc && rustup component add rust-analyzer # WASM toolchain -RUN . '/home/user/.cargo/env' && curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh -RUN . '/home/user/.cargo/env' && cargo install cargo-generate +RUN . /home/user/.bashrc && curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh +RUN . /home/user/.bashrc && cargo install cargo-generate VOLUME /home/user -- 2.54.0 From 248e27d52d87393f97a6c4485b5e046d6efc69bf Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 15:25:53 +0100 Subject: [PATCH 36/40] Cleanup --- containers/base/Containerfile | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/containers/base/Containerfile b/containers/base/Containerfile index 59ff2d0..379e001 100644 --- a/containers/base/Containerfile +++ b/containers/base/Containerfile @@ -7,7 +7,7 @@ RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ procps ping bash-completion glibc-langpack-en openssl-devel \ host-spawn dbus-launch \ git pnpm helix zip rsync \ - dotnet-sdk-9.0 dotnet-sdk-10.0 go + dotnet-sdk-10.0 # === setup user === RUN useradd -ms /bin/bash user && \ @@ -19,8 +19,8 @@ RUN ln -s /usr/local/bin/host /usr/local/bin/podman # === root language servers === COPY install-roslyn.sh /tmp/install-roslyn.sh -RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh -RUN go install golang.org/x/tools/gopls@latest +RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh && rm /tmp/omnisharp.tar.gz && rm /tmp/install-roslyn.sh +# RUN go install golang.org/x/tools/gopls@latest USER user WORKDIR /home/user @@ -32,18 +32,22 @@ COPY --chown=user:user config/helix/ .config/helix/ COPY config/bin /usr/local/bin # === Setup PNPM & install language servers, tools === -RUN /bin/bash -c "SHELL=/bin/bash pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ +RUN /bin/bash -c ". /home/user/.bashrc && pnpm setup && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ typescript typescript-language-server" -RUN dotnet tool install --global dotnet-ef -RUN echo 'export PATH="$PATH:/home/user/.dotnet/tools:/home/user/.cargo/env"' >> /home/user/.bashrc +RUN dotnet tool install --global dotnet-ef && \ + echo 'export PATH="$PATH:/home/user/.dotnet/tools:/home/user/.cargo/env"' >> /home/user/.bashrc -# === Rust toolchain === +# === Rust, WASM toolchain === RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -RUN . /home/user/.bashrc && rustup component add rust-analyzer +RUN . /home/user/.bashrc && rustup component add rust-analyzer && \ + curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh && \ + cargo install cargo-generate && \ + cargo install cargo-expand -# WASM toolchain -RUN . /home/user/.bashrc && curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh -RUN . /home/user/.bashrc && cargo install cargo-generate +# === Cleanup build dependencies === +USER root +RUN dnf remove -y openssl-devel && dnf clean all +USER user VOLUME /home/user -- 2.54.0 From d987d64ac8790f0cf4a5f88db2b65cfaa1b3f21f Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 15:28:08 +0100 Subject: [PATCH 37/40] again --- containers/base/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/base/Containerfile b/containers/base/Containerfile index 379e001..8c1876b 100644 --- a/containers/base/Containerfile +++ b/containers/base/Containerfile @@ -32,7 +32,7 @@ COPY --chown=user:user config/helix/ .config/helix/ COPY config/bin /usr/local/bin # === Setup PNPM & install language servers, tools === -RUN /bin/bash -c ". /home/user/.bashrc && pnpm setup && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ +RUN /bin/bash -c ". /home/user/.bashrc && pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ typescript typescript-language-server" RUN dotnet tool install --global dotnet-ef && \ -- 2.54.0 From a549d67c7ea793647fe4fc7c117b10f4d91ef8e2 Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 15:30:26 +0100 Subject: [PATCH 38/40] more cleanup --- containers/base/Containerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/containers/base/Containerfile b/containers/base/Containerfile index 8c1876b..0bd01d4 100644 --- a/containers/base/Containerfile +++ b/containers/base/Containerfile @@ -47,7 +47,7 @@ RUN . /home/user/.bashrc && rustup component add rust-analyzer && \ # === Cleanup build dependencies === USER root -RUN dnf remove -y openssl-devel && dnf clean all +RUN dnf remove -y openssl-devel && dnf clean all && rm -rf /home/user/.cargo USER user VOLUME /home/user -- 2.54.0 From 7f342a7529acb7186f105f8c570135222c71ee03 Mon Sep 17 00:00:00 2001 From: maurice Date: Sat, 14 Mar 2026 20:23:44 +0100 Subject: [PATCH 39/40] WIP --- build.sh | 5 +++++ containers/rider/Containerfile | 2 +- devc.sh | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 build.sh diff --git a/build.sh b/build.sh new file mode 100644 index 0000000..e1f4c26 --- /dev/null +++ b/build.sh @@ -0,0 +1,5 @@ +#!/bin/sh +cd containers/base +podman build -t git.plabble.org/maurice/base:main . +cd ../rider +podman build -t git.plabble.org/maurice/rider:main . \ No newline at end of file diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile index ed6a24c..0a431ee 100644 --- a/containers/rider/Containerfile +++ b/containers/rider/Containerfile @@ -1,5 +1,5 @@ FROM git.plabble.org/maurice/base:main -ARG rider_version="2025.3.2" +ARG rider_version="2025.3.3" ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" USER root diff --git a/devc.sh b/devc.sh index 98ae201..c9d15bf 100755 --- a/devc.sh +++ b/devc.sh @@ -16,7 +16,7 @@ default_args() { arg "--hostname $name" # Pull newer container image if available. - arg "--pull=newer" + # arg "--pull=newer" # Use keep-id so the container user matches the host user. arg "--userns=keep-id" -- 2.54.0 From 500c6034dd56cdf868539b2e1bedbb0c5fe3d7f7 Mon Sep 17 00:00:00 2001 From: maurice Date: Fri, 28 Aug 2026 16:37:53 +0200 Subject: [PATCH 40/40] Big boom --- build.sh | 6 +- container/Containerfile | 107 ++++++++++++ {containers/base => container}/config/bashrc | 5 +- container/config/bin/host | 6 + {containers/base => container}/config/git | 0 .../config/helix/config.toml | 0 container/config/helix/languages.toml | 33 ++++ containers/android/Containerfile | 20 --- containers/base/Containerfile | 53 ------ containers/base/config/bin/host | 4 - containers/base/config/helix/languages.toml | 12 -- containers/base/install-roslyn.sh | 9 - containers/flutter/Containerfile | 11 -- containers/rider/Containerfile | 18 -- containers/rider/config.sh | 4 - devc.sh | 165 +++++++----------- example-bashrc | 28 --- 17 files changed, 213 insertions(+), 268 deletions(-) create mode 100644 container/Containerfile rename {containers/base => container}/config/bashrc (84%) create mode 100755 container/config/bin/host rename {containers/base => container}/config/git (100%) rename {containers/base => container}/config/helix/config.toml (100%) create mode 100644 container/config/helix/languages.toml delete mode 100644 containers/android/Containerfile delete mode 100644 containers/base/Containerfile delete mode 100755 containers/base/config/bin/host delete mode 100644 containers/base/config/helix/languages.toml delete mode 100644 containers/base/install-roslyn.sh delete mode 100644 containers/flutter/Containerfile delete mode 100644 containers/rider/Containerfile delete mode 100644 containers/rider/config.sh delete mode 100644 example-bashrc diff --git a/build.sh b/build.sh index e1f4c26..4e56e4d 100644 --- a/build.sh +++ b/build.sh @@ -1,5 +1,3 @@ #!/bin/sh -cd containers/base -podman build -t git.plabble.org/maurice/base:main . -cd ../rider -podman build -t git.plabble.org/maurice/rider:main . \ No newline at end of file +cd container && \ +podman build -t git.plabble.org/maurice/devc:main . \ No newline at end of file diff --git a/container/Containerfile b/container/Containerfile new file mode 100644 index 0000000..5d5a7ff --- /dev/null +++ b/container/Containerfile @@ -0,0 +1,107 @@ +FROM quay.io/fedora/fedora:44 + +# === install system packages === +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf update -y && \ + dnf -y --setopt=keepcache=1 --setopt=install_weak_deps=False install \ + bash-completion git-core curl awk jq rg zip unzip which \ + host-spawn wl-copy gcc helix helix-themes rsync python3 python3-pip dotnet-sdk-10.0 openssl-devel + +# === setup user === +RUN useradd -ms /bin/bash user && \ + echo 'user ALL=(ALL) NOPASSWD: ALL' > /etc/sudoers.d/user && \ + mkdir -p /run/user/1000 && \ + chown user:user /run/user/1000 + +# === Add host entry for podman & XDG open === +RUN ln -s /usr/local/bin/host /usr/local/bin/podman && \ + ln -s /usr/local/bin/host /usr/local/bin/xdg-open + +COPY config/bin /usr/local/bin + +# === languages & SDKs === + +# Golang +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 && \ + export GOPATH=/usr/local/go && \ + go install golang.org/x/tools/gopls@latest && \ + ln -sf /usr/local/go/bin/gopls /usr/local/bin/gopls + +# Deno +RUN export DENO_INSTALL=/usr/local/deno && \ + curl -fsSL https://deno.land/install.sh | sh && \ + ln -sf /usr/local/deno/bin/deno /usr/local/bin/deno + +# Rust +RUN export RUSTUP_HOME=/usr/local/rust && \ + export CARGO_HOME=/usr/local/rust && \ + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --no-modify-path && \ + ln -sf /usr/local/rust/bin/rustc /usr/local/bin/rustc && \ + ln -sf /usr/local/rust/bin/cargo /usr/local/bin/cargo && \ + ln -sf /usr/local/rust/bin/rustup /usr/local/bin/rustup && \ + ln -sf /usr/local/rust/bin/rustfmt /usr/local/bin/rustfmt && \ + ln -sf /usr/local/rust/bin/clippy /usr/local/bin/clippy && \ + ln -sf /usr/local/rust/bin/rust-analyzer /usr/local/bin/rust-analyzer && \ + rustup component add rustfmt clippy rust-analyzer && \ + curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh +# cargo install cargo-generate && \ +# cargo install cargo-expand + +# Dotnet +RUN dotnet tool install --global dotnet-ef && \ + mkdir -p /usr/local/bin/omnisharp && \ + curl -L https://github.com/OmniSharp/omnisharp-roslyn/releases/latest/download/omnisharp-linux-x64-net6.0.tar.gz \ + | tar xz -C /usr/local/bin/omnisharp && \ + chmod +x /usr/local/bin/omnisharp/OmniSharp + +# PHP +RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ + dnf -y install https://rpm.henderkes.com/static-php-1-0.noarch.rpm && \ + dnf -y module enable php-zts:static-8.5 && \ + dnf install -y \ + frankenphp \ + php-zts-dom \ + php-zts-xml \ + php-zts-tokenizer \ + php-zts-session \ + php-zts-posix \ + php-zts-fileinfo \ + php-zts-simplexml \ + php-zts-xmlreader \ + php-zts-xmlwriter \ + php-zts-soap \ + php-zts-gd \ + php-zts-pdo_mysql \ + php-zts-pcntl \ + php-zts-zip \ + php-zts-exif \ + php-zts-bcmath \ + php-zts-mysqli \ + php-zts-imagick \ + php-zts-grpc && \ + curl -fsSL https://getcomposer.org/installer | \ + php -- --install-dir=/usr/local/bin --filename=composer + +# === install language servers, tools === +RUN deno i -g -f -A --root /usr/local/bin npm:npm npm:bash-language-server npm:vscode-langservers-extracted npm:dockerfile-language-server-nodejs \ + npm:typescript npm:typescript-language-server + +USER user +WORKDIR /home/user +RUN mkdir -p .config .local .cache + +COPY --chown=user:user config/bashrc .bashrc +COPY --chown=user:user config/git .config/git/config +COPY --chown=user:user config/helix/ .config/helix/ + +# === Cleanup build dependencies === +USER root +RUN dnf remove -y openssl-devel && dnf clean all && \ + rm -rf /tmp/* && rm -rf /root/* + +USER user + +VOLUME /home/user diff --git a/containers/base/config/bashrc b/container/config/bashrc similarity index 84% rename from containers/base/config/bashrc rename to container/config/bashrc index c1191d0..36cd0f3 100644 --- a/containers/base/config/bashrc +++ b/container/config/bashrc @@ -5,6 +5,9 @@ export EDITOR=hx \ WAYLAND_DISPLAY=wayland-0 \ XDG_RUNTIME_DIR=/run/user/1000 \ SSH_AUTH_SOCK=/run/user/1000/ssh-auth-sock \ + CARGO_HOME=/usr/local/rust \ + RUSTUP_HOME=/usr/local/rust \ + GOPATH=/usr/local/go \ PS1="\[\e[30;46m\] \h | \w \[\e[0;36m\]î‚°\[\e[m\] " \ TZ="Europe/Amsterdam" \ SHELL="/bin/bash" @@ -13,7 +16,7 @@ export EDITOR=hx \ pbcopy() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; } alias random="cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1" -# Git aliases +# === Git aliases === alias gc="git commit -m" alias ga="git add -A" alias gf="git fetch" diff --git a/container/config/bin/host b/container/config/bin/host new file mode 100755 index 0000000..0610301 --- /dev/null +++ b/container/config/bin/host @@ -0,0 +1,6 @@ +#!/bin/bash +export DBUS_SESSION_BUS_ADDRESS="unix:path=/tmp/bus" + +cmd="${0##*/}" +[[ "$cmd" == "host" ]] && unset cmd +exec host-spawn -cwd "${PWD/#$HOME/$HOST_HOME}" ${cmd:+"$cmd"} "$@ \ No newline at end of file diff --git a/containers/base/config/git b/container/config/git similarity index 100% rename from containers/base/config/git rename to container/config/git diff --git a/containers/base/config/helix/config.toml b/container/config/helix/config.toml similarity index 100% rename from containers/base/config/helix/config.toml rename to container/config/helix/config.toml diff --git a/container/config/helix/languages.toml b/container/config/helix/languages.toml new file mode 100644 index 0000000..6861f1e --- /dev/null +++ b/container/config/helix/languages.toml @@ -0,0 +1,33 @@ +# C# +[language-server.omnisharp] +command = "/usr/local/bin/omnisharp/OmniSharp" +args = [ "--languageserver" ] + +# Rust +[language-server.rust-analyzer.config.check] +command = "clippy" + +[language-server.deno-lsp] +command = "deno" +args = ["lsp"] +config.deno.enable = true + +[[language]] +name = "rust" +formatter = { command = "rustfmt" } + +# TS +[[language]] +name = "typescript" +roots = ["deno.json", "deno.jsonc", "package.json"] +file-types = ["ts", "tsx"] +auto-format = true +language-servers = ["deno-lsp"] + +# JS +[[language]] +name = "javascript" +roots = ["deno.json", "deno.jsonc", "package.json"] +file-types = ["js", "jsx"] +auto-format = true +language-servers = ["deno-lsp"] \ No newline at end of file diff --git a/containers/android/Containerfile b/containers/android/Containerfile deleted file mode 100644 index 95ece7a..0000000 --- a/containers/android/Containerfile +++ /dev/null @@ -1,20 +0,0 @@ -FROM git.plabble.org/maurice/base:main -ARG studio_version="2025.3.2.6" -ARG download_uri="https://redirector.gvt1.com/edgedl/android/studio/ide-zips/${studio_version}/android-studio-${studio_version}-linux.tar.gz" - -USER root -# === setup GUI === -RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ - dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel mesa-libGLU -USER user - -RUN curl -Lo /tmp/studio.tar.gz "${download_uri}" && \ - mkdir /home/user/AndroidStudio && \ - mkdir /home/user/Android && \ - tar -zxf /tmp/studio.tar.gz -C /home/user/AndroidStudio && \ - rm /tmp/studio.tar.gz && \ - mv /home/user/AndroidStudio/android-studio*/* /home/user/AndroidStudio - -RUN echo 'alias studio="$HOME/AndroidStudio/bin/studio"' >> /home/user/.bashrc -RUN echo 'export ANDROID_HOME="$HOME/Android/Sdk"' >> /home/user/.bashrc -RUN echo 'export PATH="$ANDROID_HOME/platform-tools:$PATH"' >> /home/user/.bashrc diff --git a/containers/base/Containerfile b/containers/base/Containerfile deleted file mode 100644 index 0bd01d4..0000000 --- a/containers/base/Containerfile +++ /dev/null @@ -1,53 +0,0 @@ -FROM quay.io/fedora/fedora:43 - -# === install system packages === -RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ - dnf update -y && \ - dnf -y --setopt=keepcache=1 install \ - procps ping bash-completion glibc-langpack-en openssl-devel \ - host-spawn dbus-launch \ - git pnpm helix zip rsync \ - dotnet-sdk-10.0 - -# === setup user === -RUN useradd -ms /bin/bash user && \ - usermod -aG wheel user && sed -i '/NOPASSWD/s/^#//g' /etc/sudoers && \ - mkdir -p /run/user/1000 && chown user:user /run/user/1000 - -# === Add host entry for podman === -RUN ln -s /usr/local/bin/host /usr/local/bin/podman - -# === root language servers === -COPY install-roslyn.sh /tmp/install-roslyn.sh -RUN chmod +x /tmp/install-roslyn.sh && /tmp/install-roslyn.sh && rm /tmp/omnisharp.tar.gz && rm /tmp/install-roslyn.sh -# RUN go install golang.org/x/tools/gopls@latest - -USER user -WORKDIR /home/user -RUN mkdir .config .local .cache - -COPY --chown=user:user config/bashrc .bashrc -COPY --chown=user:user config/git .config/git/config -COPY --chown=user:user config/helix/ .config/helix/ -COPY config/bin /usr/local/bin - -# === Setup PNPM & install language servers, tools === -RUN /bin/bash -c ". /home/user/.bashrc && pnpm setup && . /home/user/.bashrc && pnpm i -g deno bash-language-server vscode-langservers-extracted dockerfile-language-server-nodejs \ - typescript typescript-language-server" - -RUN dotnet tool install --global dotnet-ef && \ - echo 'export PATH="$PATH:/home/user/.dotnet/tools:/home/user/.cargo/env"' >> /home/user/.bashrc - -# === Rust, WASM toolchain === -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y -RUN . /home/user/.bashrc && rustup component add rust-analyzer && \ - curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh && \ - cargo install cargo-generate && \ - cargo install cargo-expand - -# === Cleanup build dependencies === -USER root -RUN dnf remove -y openssl-devel && dnf clean all && rm -rf /home/user/.cargo -USER user - -VOLUME /home/user diff --git a/containers/base/config/bin/host b/containers/base/config/bin/host deleted file mode 100755 index f8fe5ed..0000000 --- a/containers/base/config/bin/host +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -export DBUS_SESSION_BUS_ADDRESS=unix:path=/tmp/bus -host-spawn -cwd "${PWD/#$HOME/$HOST_HOME}" \ - $([ "$(basename "$0")" != "host" ] && echo "$(basename "$0")") "$@" diff --git a/containers/base/config/helix/languages.toml b/containers/base/config/helix/languages.toml deleted file mode 100644 index f1dbd9a..0000000 --- a/containers/base/config/helix/languages.toml +++ /dev/null @@ -1,12 +0,0 @@ -# C# -[language-server.omnisharp] -command = "/home/user/.omnisharp/OmniSharp" -args = [ "--languageserver" ] - -# Rust -[language-server.rust-analyzer.config.check] -command = "clippy" - -[[language]] -name = "rust" -formatter = { command = "rustfmt" } \ No newline at end of file diff --git a/containers/base/install-roslyn.sh b/containers/base/install-roslyn.sh deleted file mode 100644 index 865c354..0000000 --- a/containers/base/install-roslyn.sh +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/bash -version="v1.39.15" -arch="linux-x64" -link="https://github.com/OmniSharp/omnisharp-roslyn/releases/download/$version/omnisharp-$arch-net6.0.tar.gz" - -curl -Lo /tmp/omnisharp.tar.gz $link -mkdir /home/user/.omnisharp -tar -zxf /tmp/omnisharp.tar.gz -C /home/user/.omnisharp/ -chown -R user:user /home/user/.omnisharp \ No newline at end of file diff --git a/containers/flutter/Containerfile b/containers/flutter/Containerfile deleted file mode 100644 index 36b1d2d..0000000 --- a/containers/flutter/Containerfile +++ /dev/null @@ -1,11 +0,0 @@ -FROM git.plabble.org/maurice/base:main -ARG flutter_version="3.41.4-stable" -ARG download_uri="https://storage.googleapis.com/flutter_infra_release/releases/stable/linux/flutter_linux_${flutter_version}.tar.xz" - -RUN mkdir /home/user/Flutter && \ - curl -Lo /tmp/flutter.tar.xz "${download_uri}" && \ - tar -xf /tmp/flutter.tar.xz -C /home/user/Flutter && \ - rm /tmp/flutter.tar.xz - -RUN echo 'export PATH="$HOME/Flutter/flutter/bin:$PATH"' >> /home/user/.bashrc -RUN echo 'export FLUTTER_ROOT="$HOME/Flutter/flutter"' >> /home/user/.bashrc \ No newline at end of file diff --git a/containers/rider/Containerfile b/containers/rider/Containerfile deleted file mode 100644 index 0a431ee..0000000 --- a/containers/rider/Containerfile +++ /dev/null @@ -1,18 +0,0 @@ -FROM git.plabble.org/maurice/base:main -ARG rider_version="2025.3.3" -ARG download_uri="https://download.jetbrains.com/rider/JetBrains.Rider-${rider_version}.tar.gz" - -USER root - -# === setup GUI === -RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \ - dnf -y --setopt=keepcache=1 install libXext libXrender libXtst libX11 freetype freetype-devel -USER user - -RUN curl -Lo /tmp/rider.tar.gz "${download_uri}" && \ - mkdir /home/user/Rider && \ - tar -zxf /tmp/rider.tar.gz -C /home/user/Rider && \ - rm /tmp/rider.tar.gz && \ - mv /home/user/Rider/JetBrains*/* /home/user/Rider - -RUN echo 'alias rider="$HOME/Rider/bin/rider"' >> /home/user/.bashrc diff --git a/containers/rider/config.sh b/containers/rider/config.sh deleted file mode 100644 index e0535ed..0000000 --- a/containers/rider/config.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/bin/bash -mkdir -p /tmp/joypet-sockets -arg "-p 7777:7777" -arg "-v /tmp/joypet-sockets:/var/run/joypet-sockets:Z" \ No newline at end of file diff --git a/devc.sh b/devc.sh index c9d15bf..9ef7ac4 100755 --- a/devc.sh +++ b/devc.sh @@ -1,125 +1,82 @@ #!/bin/bash # =============================================== # -# devc.sh v2.0; job79, maurice # -# Dev container enter script. Handles setting up # -# different dev containers, resuming sessions and # -# automatic container updates. # +# devc.sh v2.1; job79, maurice # +# Dev container entry script. # # =============================================== # -set -eu -log() { printf '\e[%sm%s\e[0m %s\n' "${3:-36}" "${2:-â—‹}" "$1"; } -arg() { echo -n " $@"; } +set -euo pipefail +log() { echo -e "\e[36mâ—‹\e[0m $1"; } +die() { echo -e "\e[31mx\e[0m $1" && exit 1; } -# run_args returns the podman run arguments required for -# starting a new container. +# default_args configures standard container options. default_args() { - arg "--name $name" - arg "--hostname $name" + run_opts+=( + "--name" "$name" + "--hostname" "$name" + "--network" "devc" + "--pull=newer" # Update image. + "--userns=keep-id" # Map host user. + "-v" "$name:/home/user:copy" # Persistent home volume. + "-v" "dnf-cache:/var/cache/libdnf5" # Cache dnf metadata. + ) - # Pull newer container image if available. - # arg "--pull=newer" + # Unix sockets require SELinux label disable. + [[ -d /sys/fs/selinux ]] && run_opts+=("--security-opt" "label=disable") - # Use keep-id so the container user matches the host user. - arg "--userns=keep-id" + # Desktop integration (Wayland, SSH). + [[ -e "/run/user/$UID/wayland-0" ]] && run_opts+=("-v" "/run/user/$UID/wayland-0:/run/user/1000/wayland-0") + [[ -e "${SSH_AUTH_SOCK:-}" ]] && run_opts+=("-v" "$SSH_AUTH_SOCK:/run/user/1000/ssh-auth-sock") - # Disable selinux labeling so unix sockets can be mounted - # without problems. - arg "--security-opt label=disable" - - # 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 working. - [ -e "$SSH_AUTH_SOCK" ] && arg "-v $SSH_AUTH_SOCK:/run/user/1000/ssh-auth-sock" - - # Make the user home dir a volume so it survives container - # restarts. Use copy to keep the files from the image. - arg "-v $name:/home/user:copy" - - # If there is custom configuration for the container, load - # it here. - config_file="$(dirname "$(realpath "$0")")/containers/$name/config.sh" - [ -f "$config_file" ] && source "${config_file}" + # Load custom container config. + local config_file="${BASH_SOURCE[0]%/*}/container/config.sh" + [[ -f "$config_file" ]] && source "$config_file" || true } -# param_args returns the podman run arguments based on the -# arguments provided to this script. +# param_args parses CLI arguments into podman run options. param_args() { - while test $# -gt 0; do + while (($# > 0)); do case "$1" in - -gpu) # Enable gpu acceleration. - arg "--device /dev/dri" ;; - -kvm) # Enable KVM - arg "--device /dev/kvm" ;; - -usb) # Enable USB access - arg "--device /dev/bus/usb" ;; - -host-spawn) # Enable spawning host commands from inside the container using host-spawn. - arg "-v /run/user/$UID/bus:/tmp/bus" - arg "-e HOST_HOME=$HOME" # Used to translate paths. - ;; - -net) # Enable network 'dev-'' and 'devc' - arg "--network dev-$name --network devc" - ;; - -mnt) # Mount directory. - shift - arg "-w /workdir/" - arg "-v $1:/workdir/$([ ! -d "$1" ] && echo $1)" - ;; - -mdf) # Mount dev folder - arg "-v $HOME/dev:/home/user/dev" - ;; - -x11) # Enable X11 support. - arg "-v /tmp/.X11-unix:/tmp/.X11-unix" - arg "-v $XAUTHORITY:/run/user/1000/.Xauthority:ro" - arg "-e DISPLAY=$DISPLAY" - arg "-e XAUTHORITY=/run/user/1000/.Xauthority" - ;; - *) # Use unknown arguments a podman arguments. - arg "$1" ;; + -gpu) run_opts+=("--device" "/dev/dri") ;; + -kvm) run_opts+=("--device" "/dev/kvm") ;; + -usb) run_opts+=("--device" "/dev/bus/usb") ;; + -host-spawn) run_opts+=("-v" "/run/user/$UID/bus:/tmp/bus" "-e" "HOST_HOME=$HOME") ;; + -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 done } -### MAIN ### -# Get the devcontainer name from the first argument. If not -# provided, use the last used name when possible. -if [[ $# -gt 0 ]] && [[ ${1:-} != -* ]]; then - image="$1" - [[ "$image" != *:* ]] && image="$image:main" - echo "$image" >"$HOME/.local/share/devc-previous-container" - shift -elif [ -f "$HOME/.local/share/devc-previous-container" ]; then - image=$(<"$HOME/.local/share/devc-previous-container") -else - log "no container name specified" 'x' 31 - exit 1 -fi -name="${image%:*}" +main() { + local state_file="$HOME/.local/share/devc-previous-container" + local image="devc" -# Get container registry from the 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 + # Resolve container name (CLI arg > Last used > Error). + if [[ $image && $image != -* ]]; then + shift + [[ $image != *:* ]] && image+=":main" + echo "$image" >"$state_file" + elif [[ -f $state_file ]]; then + image=$(<$state_file) + else + die "no container name specified" + fi + local name="${image%:*}" -# Get container command from the DEVC_COMMAND env variable -# if set, else use bash -l. -if [ -z "${DEVC_COMMAND:-}" ]; then - DEVC_COMMAND="bash -l" -fi + # 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..." -# When container is not running or arguments are provided, -# recreate it. -if [ "$(podman container inspect "$name" -f {{.State.Running}} 2>&1)" != 'true' ] || [[ $# -gt 0 ]]; then - log "starting devcontainer..." - podman network create --ignore "dev-$name" - podman network create --ignore "devc" - podman container rm -f -t 0 "$name" 1>/dev/null - podman run -td $(default_args) $(param_args $@) "$registry/$image" -fi + default_args + param_args "$@" -podman exec --detach-keys "ctrl-@" -it "$name" ${DEVC_COMMAND:-} + [[ -n "${DEVC_REGISTRY:-}" ]] || die "registry unknown; set the DEVC_REGISTRY environment variable" + podman network create devc --ignore > /dev/null 2>&1 + podman run --replace --stop-timeout 0 -td "${run_opts[@]}" "$DEVC_REGISTRY/$image" + fi + + exec podman exec --detach-keys "ctrl-@,ctrl-@" -it "$name" ${DEVC_COMMAND:-bash -l} +} + +main "$@" diff --git a/example-bashrc b/example-bashrc deleted file mode 100644 index 5d2a215..0000000 --- a/example-bashrc +++ /dev/null @@ -1,28 +0,0 @@ -# Tools -pbcopy() { curl -sF "content=<-" "https://paste.plabble.org/$2?lang=$1" && echo; } -alias code="flatpak run com.visualstudio.code" -alias random="cat /dev/urandom | tr -dc '[:alpha:]' | fold -w ${1:-20} | head -n 1" - -# Dev containers -export DEVC_REGISTRY="git.plabble.org/maurice" - -function devc() { - "$HOME/dev/devcontainer/devc.sh" "$@" -mdf -} - -alias rider="DEVC_COMMAND=/home/user/Rider/bin/rider devc rider -x11 -host-spawn -net" -alias flutter="devc flutter -x11 -host-spawn -kvm -usb -gpu" -alias androidstudio="DEVC_COMMAND=/home/user/AndroidStudio/bin/studio devc android -x11 -host-spawn -kvm -usb -gpu" - -function hx() { - arg="${1:-.}" - DEVC_COMMAND="hx $arg" devc fedora -mnt $arg -} - -# Git aliases -alias gc="git commit -m" -alias ga="git add -A" -alias gf="git fetch" -alias gp="git pull" -alias gpp="git push" -alias gs="git status" -- 2.54.0