{"id":28310116,"url":"https://github.com/ika-rwth-aachen/docker-run","last_synced_at":"2025-07-09T10:38:39.845Z","repository":{"id":170619752,"uuid":"643986315","full_name":"ika-rwth-aachen/docker-run","owner":"ika-rwth-aachen","description":"'docker run' and 'docker exec' with useful defaults","archived":false,"fork":false,"pushed_at":"2025-07-08T21:24:40.000Z","size":1317,"stargazers_count":48,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-07-08T22:29:28.867Z","etag":null,"topics":["docker"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ika-rwth-aachen.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-05-22T15:06:48.000Z","updated_at":"2025-06-18T17:21:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"2237ca84-815f-4c04-a97b-32b5044716e0","html_url":"https://github.com/ika-rwth-aachen/docker-run","commit_stats":null,"previous_names":["ika-rwth-aachen/docker-run"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/ika-rwth-aachen/docker-run","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ika-rwth-aachen%2Fdocker-run","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ika-rwth-aachen%2Fdocker-run/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ika-rwth-aachen%2Fdocker-run/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ika-rwth-aachen%2Fdocker-run/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ika-rwth-aachen","download_url":"https://codeload.github.com/ika-rwth-aachen/docker-run/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ika-rwth-aachen%2Fdocker-run/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264441546,"owners_count":23608906,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["docker"],"created_at":"2025-05-24T11:10:34.616Z","updated_at":"2025-07-09T10:38:39.831Z","avatar_url":"https://github.com/ika-rwth-aachen.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cimg src=\"https://github.com/ika-rwth-aachen/docker-run/raw/main/assets/logo.png\" height=130 align=\"right\"\u003e\n\n# *docker-run* – ``docker run`` and ``docker exec`` with useful defaults\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://img.shields.io/github/license/ika-rwth-aachen/docker-run\"/\u003e\n  \u003ca href=\"https://pypi.org/project/docker-run-cli/\"\u003e\u003cimg src=\"https://img.shields.io/badge/python-v3.7--v3.12-blue.svg\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/docker-run-cli/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/v/docker-run-cli?label=PyPI\"/\u003e\u003c/a\u003e\n  \u003ca href=\"https://pypi.org/project/docker-run-cli/\"\u003e\u003cimg src=\"https://img.shields.io/pypi/dm/docker-run-cli?color=blue\u0026label=PyPI%20downloads\"/\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n*docker-run* is a CLI tool for simplified interaction with Docker images. Use it to easily start and attach to Docker containers with useful predefined arguments.\n\n\u003e [!IMPORTANT]  \n\u003e This repository is open-sourced and maintained by the [**Institute for Automotive Engineering (ika) at RWTH Aachen University**](https://www.ika.rwth-aachen.de/).  \n\u003e **DevOps, Containerization and Orchestration of Software-Defined Vehicles** are some of many research topics within our [*Vehicle Intelligence \u0026 Automated Driving*](https://www.ika.rwth-aachen.de/en/competences/fields-of-research/vehicle-intelligence-automated-driving.html) domain.  \n\u003e If you would like to learn more about how we can support your advanced driver assistance and automated driving efforts, feel free to reach out to us!  \n\u003e :email: ***opensource@ika.rwth-aachen.de***\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://github.com/ika-rwth-aachen/docker-run/raw/main/assets/teaser.png\" width=550\u003e\n\u003c/p\u003e\n\nWhile *docker-run* can be used with any Docker image, we recommend to also check out our other tools for Docker and ROS.\n- [*docker-ros*](https://github.com/ika-rwth-aachen/docker-ros) automatically builds minimal container images of ROS applications \u003ca href=\"https://github.com/ika-rwth-aachen/docker-ros\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/ika-rwth-aachen/docker-ros?style=social\"/\u003e\u003c/a\u003e\n- [*docker-ros-ml-images*](https://github.com/ika-rwth-aachen/docker-ros-ml-images) provides machine learning-enabled ROS Docker images \u003ca href=\"https://github.com/ika-rwth-aachen/docker-ros-ml-images\"\u003e\u003cimg src=\"https://img.shields.io/github/stars/ika-rwth-aachen/docker-ros-ml-images?style=social\"/\u003e\u003c/a\u003e\n\n\n## Quick Demo\n\nThe following quickly launches the GUI application `xeyes` to demonstrate how `docker-run` takes care of X11 forwarding from container to host. The `--verbose` flag prints the underlying `docker run` command that is run under the hood.\n\n```bash\ndocker-run --verbose 607qwq/xeyes\n```\n\n\n## Functionality\n\n`docker-run` is designed to be used the same way as the official [`docker run`](https://docs.docker.com/engine/reference/commandline/run/) and [`docker exec`](https://docs.docker.com/engine/reference/commandline/exec/) commands.\n\nIn general, you can pass the same arguments to `docker-run` as you would pass to `docker run`, e.g.\n\n```bash\ndocker-run --volume $(pwd):/volume ubuntu ls /volume\n```\n\nIn addition to the arguments you are passing, `docker-run` however also enables the following features by default. Most of these default features can be disabled, see [Usage](#usage).\n- container removal after exit (`--rm`)\n- interactive tty (`--interactive --tty`)\n- current directory name as container name (`--name`)\n- relative bind mounts (`--volume [./RELATIVE_PATH\u003e]:[TARGET_PATH]`)\n- GPU support (`--gpus all` / `--runtime nvidia`)\n- X11 GUI forwarding\n\nIf a container with matching name is already running, `docker-run` will execute a command in that container via `docker exec` instead. This lets you quickly attach to a running container without passing any command, e.g.\n\n```bash\ndocker-run --name my-running-container\n```\n\nUnlike with `docker run`, you can also set the Docker image via the `--image` arguments, see [Usage](#usage). This may be required for more complex use cases.\n\n\n## Installation\n\n```bash\npip install docker-run-cli\n\n# (optional) shell auto-completion\nsource $(activate-python-docker-run-shell-completion 2\u003e /dev/null)\n```\n\n\u003e [!WARNING]  \n\u003e Outside of a virtual environment, *pip* may default to a user-site installation of executables to `~/.local/bin`, which may not be present in your shell's `PATH`.  If running `docker-run` errors with `docker-run: command not found`, add the directory to your path. [*(More information)*](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-to-the-user-site)  \n\u003e ```bash\n\u003e echo \"export PATH=\\$HOME/.local/bin:\\$PATH\" \u003e\u003e ~/.bashrc\n\u003e source ~/.bashrc\n\u003e ```\n\n\n## Usage\n\n```\nusage: docker-run [--help] [--image IMAGE] [--loc] [--mwd] [--name NAME]\n                  [--no-gpu] [--no-it] [--no-name] [--no-rm] [--no-tz]\n                  [--no-x11] [--verbose] [--version]\n\nExecutes `docker run` with the following features enabled by default, each of\nwhich can be disabled individually: container removal after exit, interactive\ntty, current directory name as container name, GPU support, X11 GUI\nforwarding. Passes any additional arguments to `docker run`. Executes `docker\nexec` instead if a container with the specified name (`--name`) is already\nrunning.\n\noptions:\n  --help         show this help message and exit\n  --image IMAGE  image name (may also be specified without --image as last\n                 argument before command)\n  --loc          enable automatic locale\n  --mwd          mount current directory at same path\n  --name NAME    container name; generates `docker exec` command if already\n                 running\n  --no-gpu       disable automatic GPU support\n  --no-it        disable automatic interactive tty\n  --no-name      disable automatic container name (current directory)\n  --no-rm        disable automatic container removal\n  --no-tz        disable automatic timezone\n  --no-x11       disable automatic X11 GUI forwarding\n  --verbose      print generated command\n  --version      show program's version number and exit\n```\n\n## Plugins\n\n`docker-run` can be extended through plugins. Plugins are installed as optional dependencies.\n\n```bash\n# install specific plugin \u003cPLUGIN_NAME\u003e\npip install docker-run-cli[\u003cPLUGIN_NAME\u003e]\n\n# install all plugins\npip install docker-run-cli[plugins]\n```\n\n| Plugin | Description |\n| --- | --- |\n| [`docker-ros`](https://pypi.org/project/docker-run-docker-ros) | extra functionality for Docker images built by [*docker-ros*](https://github.com/ika-rwth-aachen/docker-ros) |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fika-rwth-aachen%2Fdocker-run","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fika-rwth-aachen%2Fdocker-run","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fika-rwth-aachen%2Fdocker-run/lists"}