refactor: rename script from rust-pod to devpod
This commit is contained in:
51
README.md
Normal file
51
README.md
Normal file
@@ -0,0 +1,51 @@
|
||||
# devpod
|
||||
|
||||
A modular, Alpine-based Rust development environment running in a Podman container. It automatically integrates your custom dotfiles and pre-installs a suite of essential CLI tools.
|
||||
|
||||
## Features
|
||||
|
||||
- **Seamless Integration**: Mounts your current working directory into the container at the same path.
|
||||
- **Customizable**: Modular script architecture makes it easy to add or remove tools.
|
||||
|
||||
- **Dotfile Ready**: Automatically clones and configures your dotfiles repository.
|
||||
- **Full Rust Setup**: Includes `rustup`, `cargo-binstall`, and common Rust utilities (`cargo-watch`, `cargo-get`).
|
||||
- **Pre-installed Tooling**: Includes `ripgrep`, `zoxide`, `bat`, `fd`, `neovim`, `fish`, and more.
|
||||
|
||||
## Prerequisites
|
||||
|
||||
- [podman](https://podman.io/)
|
||||
- [git](https://git-scm.com/)
|
||||
- [bash](https://www.gnu.org/software/bash/)
|
||||
|
||||
## Quick Start
|
||||
|
||||
1. Clone this repository (or navigate to the directory).
|
||||
2. Make the host script executable:
|
||||
```bash
|
||||
chmod +x devpod
|
||||
```
|
||||
3. Run the script:
|
||||
```bash
|
||||
./devpod
|
||||
```
|
||||
|
||||
*Note: The first run will take a while as it builds the container image and installs all dependencies.*
|
||||
|
||||
## How It Works
|
||||
|
||||
The setup is broken down into specialized scripts to keep the `Containerfile` clean:
|
||||
|
||||
- `install-apk.sh`: Installs system-level packages via `apk`.
|
||||
- `install-rust.sh`: Handles the Rust toolchain and `cargo-binstall`.
|
||||
- `install-cargo-tools.sh`: Installs Rust-based CLI tools and your custom crates.
|
||||
- `setup-rust-dev.sh`: The main orchestrator that runs the sub-scripts and configures your dotfiles.
|
||||
- `devpod`: The entry point that builds the image (if needed) and drops you into the container.
|
||||
|
||||
## Customization
|
||||
|
||||
To add new tools, simply edit the corresponding installation script:
|
||||
|
||||
- To add an Alpine package, edit `install-apk.sh`.
|
||||
- To add a Cargo-based tool, edit `install-cargo-tools.sh`.
|
||||
|
||||
After making changes, simply run `./devpod` again to rebuild the image.
|
||||
15
devpod
Executable file
15
devpod
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
|
||||
Reference in New Issue
Block a user