From 9f435b6a307337e9a8d48a1cd3089a88df366640 Mon Sep 17 00:00:00 2001 From: maurice Date: Thu, 12 Mar 2026 10:45:13 +0100 Subject: [PATCH] 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