forked from Job79/devcontainer
49 lines
1.6 KiB
Docker
49 lines
1.6 KiB
Docker
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 \
|
|
host-spawn dbus-launch \
|
|
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 && \
|
|
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
|
|
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 "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
|