A CLI tool that executes code in many languages using Docker containers, enabling isolated and reproducible runs.
dexec is a command-line utility written in Go that executes code in multiple programming languages using Docker containers. It provides a consistent and isolated environment by detecting file extensions and running code in appropriate Docker images, eliminating the need for local language-specific compilers or interpreters. This ensures reproducible execution across different systems without local dependencies.
Developers who need to run code snippets or scripts in various languages without installing the corresponding toolchains locally, such as those testing code across environments, educators demonstrating multi-language examples, or CI/CD pipelines requiring isolated execution.
Developers choose dexec for its simplicity and reproducibility, as it abstracts away Docker complexities with a straightforward CLI, supports shebang for making source files directly executable, and offers flexible configuration like build/runtime arguments and file inclusion. Its multi-language support via Docker images ensures consistent behavior without manual container management.
:whale: Command line interface for running code in many languages via Docker.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Automatically detects file extensions and pulls appropriate Docker images, supporting many languages without local installs, as shown in the README's examples with .cpp files.
Supports STDIN, file input, and pipes, enabling dynamic program execution like redirecting from files or using curl, detailed in the README's STDIN section.
Allows making source files directly executable with a dexec shebang, simplifying scripting workflows by adding '#!/usr/bin/env dexec' to files.
Provides options to override Docker images, pass build/runtime arguments, and include additional files or directories for tailored environments, as demonstrated with --build-arg and --include flags.
Requires Docker to be installed and running, adding setup complexity and performance latency due to container initialization, which isn't suitable for low-latency tasks.
Relies on pre-built Docker images from dexec; custom or less common languages may not be supported without manual image creation, as the README only mentions overriding with existing images.
Each execution creates a new container, which can be inefficient for repeated runs and doesn't preserve state between executions, limiting use for interactive or stateful workflows.