feat: add rust-pod development environment setup
This commit is contained in:
14
Containerfile
Normal file
14
Containerfile
Normal file
@@ -0,0 +1,14 @@
|
||||
FROM alpine:latest
|
||||
|
||||
# Copy all installation scripts into the image
|
||||
COPY install-apk.sh /usr/local/bin/
|
||||
COPY install-rust.sh /usr/local/bin/
|
||||
COPY install-cargo-tools.sh /usr/local/bin/
|
||||
COPY setup-rust-dev.sh /usr/local/bin/
|
||||
|
||||
# Make them executable and run the orchestrator
|
||||
RUN chmod +x /usr/local/bin/*.sh && \
|
||||
/usr/local/bin/setup-rust-dev.sh
|
||||
|
||||
# Set the default shell to fish (or bash)
|
||||
CMD ["/usr/bin/fish"]
|
||||
33
install-apk.sh
Executable file
33
install-apk.sh
Executable file
@@ -0,0 +1,33 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo "Installing system dependencies via apk..."
|
||||
apk add --no-cache \
|
||||
build-base \
|
||||
bash \
|
||||
curl \
|
||||
ca-certificates \
|
||||
git \
|
||||
git-delta \
|
||||
htop \
|
||||
i2c-tools \
|
||||
luarocks \
|
||||
man-pages \
|
||||
neovim \
|
||||
nushell \
|
||||
netcat-openbsd \
|
||||
ripgrep \
|
||||
starship \
|
||||
tig \
|
||||
tree-sitter \
|
||||
vim \
|
||||
wget \
|
||||
zoxide \
|
||||
bat \
|
||||
fd \
|
||||
exa \
|
||||
fish \
|
||||
rustup \
|
||||
musl-dev \
|
||||
openssl-dev \
|
||||
perl \
|
||||
linux-headers
|
||||
10
install-cargo-tools.sh
Executable file
10
install-cargo-tools.sh
Executable file
@@ -0,0 +1,10 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo "Installing cargo tools..."
|
||||
# Use binstall for speed where possible
|
||||
cargo binstall --no-confirm difftastic dust
|
||||
|
||||
echo "Installing custom crates..."
|
||||
cargo install --git https://git.nubo.sh/hulthe/wmutils.git
|
||||
cargo install --git https://git.nubo.sh/hulthe/lockscreen-blur.git
|
||||
cargo install --git https://git.nubo.sh/hulthe/volume_indicator.git
|
||||
6
install-rust.sh
Executable file
6
install-rust.sh
Executable file
@@ -0,0 +1,6 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
echo "Installing Rust toolchain..."
|
||||
rustup default stable
|
||||
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
|
||||
cargo binstall --no-confirm cargo-watch cargo-get
|
||||
15
rust-pod
Executable file
15
rust-pod
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
IMAGE_NAME="rust-dev-pod"
|
||||
|
||||
if ! podman image exists $IMAGE_NAME; then
|
||||
echo "Image $IMAGE_NAME not found. Building..."
|
||||
podman build -t $IMAGE_NAME .
|
||||
fi
|
||||
|
||||
echo "Dropping you into the Rust Dev Pod..."
|
||||
podman run -it --rm \
|
||||
-v "$PWD:$PWD" \
|
||||
-w "$PWD" \
|
||||
$IMAGE_NAME \
|
||||
bash
|
||||
15
setup-rust-dev.sh
Executable file
15
setup-rust-dev.sh
Executable file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
# Run the sub-scripts
|
||||
/usr/local/bin/install-apk.sh
|
||||
/usr/local/bin/install-rust.sh
|
||||
/usr/local/bin/install-cargo-tools.sh
|
||||
|
||||
echo "Setting up dotfiles..."
|
||||
mkdir -p $HOME/.config/dotfiles
|
||||
if [ ! -d "$HOME/.config/dotfiles/.git" ]; then
|
||||
git clone https://git.nubo.sh/hulthe/df.git $HOME/.config/dotfiles
|
||||
fi
|
||||
cd $HOME/.config/dotfiles
|
||||
bash manager/setup.sh
|
||||
Reference in New Issue
Block a user