Fixes?
Build container / build (push) Successful in 5m56s

This commit is contained in:
maurice
2026-09-09 10:36:03 +02:00
parent 622e3de7f7
commit 80f57d9a91
2 changed files with 66 additions and 29 deletions
Regular → Executable
View File
+66 -29
View File
@@ -4,31 +4,51 @@ FROM quay.io/fedora/fedora:44
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 ncurses \
host-spawn wl-copy gcc helix helix-themes rsync python3 python3-pip dotnet-sdk-10.0 openssl-devel
bash-completion \
git-core \
curl \
awk \
jq \
rg \
zip \
unzip \
which \
ncurses \
sudo \
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 && \
chmod 0440 /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
# === Add host entry for podman & XDG open ===
RUN ln -sf /usr/local/bin/host /usr/local/bin/podman && \
ln -sf /usr/local/bin/host /usr/local/bin/xdg-open
# === languages & SDKs ===
# Golang
ENV PATH="/usr/local/go/bin:/home/user/go/bin:${PATH}"
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
curl -fsSL "https://go.dev/dl/${GO_VERSION}.linux-amd64.tar.gz" \
| tar xz -C /usr/local && \
GOBIN=/usr/local/bin go install golang.org/x/tools/gopls@latest && \
GOBIN=/usr/local/bin go install github.com/caddyserver/xcaddy/cmd/xcaddy@latest
# Deno
RUN export DENO_INSTALL=/usr/local/deno && \
@@ -38,24 +58,25 @@ RUN export DENO_INSTALL=/usr/local/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 && \
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 rust-src && \
rustup target add wasm32-unknown-unknown && \
curl https://drager.github.io/wasm-pack/installer/init.sh -sSf | sh
# cargo install cargo-generate && \
# cargo install cargo-generate
# cargo install cargo-expand
# Dotnet
RUN dotnet tool install --global dotnet-ef && \
RUN dotnet tool install --tool-path /usr/local/bin 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 && \
| tar xz -C /usr/local/bin/omnisharp && \
chmod +x /usr/local/bin/omnisharp/OmniSharp
# PHP
@@ -83,23 +104,36 @@ RUN --mount=type=cache,id=dnf-cache,target=/var/cache/libdnf5 \
php-zts-mysqli \
php-zts-imagick \
php-zts-grpc && \
curl -fsSL https://getcomposer.org/installer | \
php -- --install-dir=/usr/local/bin --filename=composer
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
RUN mkdir -p /usr/local/bin/python-bins/code-review-graph && \
pip install code-review-graph --target /usr/local/bin/python-bins/code-review-graph && \
ln -sf /usr/local/bin/python-bins/code-review-graph/bin/code-review-graph /usr/local/bin/code-review-graph
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
# Ownership
RUN mkdir -p /usr/local/bin/python-bins/code-review-graph && \
pip install code-review-graph \
--target /usr/local/bin/python-bins/code-review-graph && \
ln -sf \
/usr/local/bin/python-bins/code-review-graph/bin/code-review-graph \
/usr/local/bin/code-review-graph
# Rustup is intended to remain writable by the development user.
RUN chown -R user:user /usr/local/rust
USER user
WORKDIR /home/user
RUN mkdir -p .config .local .cache
RUN mkdir -p \
.config \
.local \
.cache \
go/bin
COPY --chown=user:user config/bashrc .bashrc
COPY --chown=user:user config/git .config/git/config
@@ -107,8 +141,11 @@ 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/* && pip cache purge
RUN dnf remove -y openssl-devel && \
dnf clean all && \
rm -rf /tmp/* /root/* && \
pip cache purge
USER user