Generated by Magic Hour's AI Image Generator
dfrun
is a simple command-line tool that runs Dockerfile
instructions directly as shell commands.
It's useful for getting setup on a local environment without having to install docker.
For example:
- Using VSCode Remote SSH on a fresh remote server.
- Configuring a AI/ML Dockerfile to run locally
- 🚀 Runs Dockerfile commands directly in your shell
- 🔄 Supports multi-line RUN commands
- 📥 Handles ADD commands for downloading files
- 🌍 Sets ENV variables
- 💬 Interactive ARG prompts with default values
- 📁 Respects WORKDIR instructions
- 🐛 Debug mode for troubleshooting
Download the latest release for your platform from the releases page.
Arm Based Macs
# Download and extract
tar -xzf dfrun-macos-arm64.tar.gz
# Move to a directory in your PATH
sudo mv dfrun /usr/local/bin/
Intel Based Macs
# Download and extract
tar -xzf dfrun-macos-x86_64.tar.gz
# Move to a directory in your PATH
sudo mv dfrun /usr/local/bin/
# Download and extract
tar -xzf dfrun-linux-x86_64.tar.gz
# Move to a directory in your PATH
sudo mv dfrun /usr/local/bin/
# Extract the archive and add to your PATH
Reference https://www.rust-lang.org/tools/install to install cargo
onto your system.
cargo install --git https://github.com/magichourhq/dfrun
Basic usage:
cd /dir/with/Dockerfile
dfrun
With a specific Dockerfile:
dfrun -f path/to/Dockerfile
With debug output:
dfrun --debug
WORKDIR
: This command is ignored.
WORKDIR /app
RUN
: Executes shell commands
RUN echo "Hello, World!"
ENV
: Sets environment variables
ENV MY_VAR=value
ARG
: Prompts for values with optional defaults
ARG VERSION=1.0
ARG USER
ADD
: Downloads files from URLs
ADD https://example.com/file.txt .
Requirements:
- Rust 1.70 or later
- Cargo
Setup:
# Clone the repository after forking
git clone https://github.com/magichourhq/dfrun
cd dfrun
# Install locally
cargo install --path .
# Build
cargo build
# Run tests
cargo test
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.