docker-run-cli

'docker run' and 'docker exec' with useful defaults

https://github.com/ika-rwth-aachen/docker-run

Science Score: 62.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
  • Academic publication links
  • Committers with academic emails
    4 of 5 committers (80.0%) from academic institutions
  • Institutional organization owner
    Organization ika-rwth-aachen has institutional domain (www.ika.rwth-aachen.de)
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (12.3%) to scientific vocabulary

Keywords

docker
Last synced: 6 months ago · JSON representation ·

Repository

'docker run' and 'docker exec' with useful defaults

Basic Info
  • Host: GitHub
  • Owner: ika-rwth-aachen
  • License: mit
  • Language: Python
  • Default Branch: main
  • Homepage:
  • Size: 1.26 MB
Statistics
  • Stars: 48
  • Watchers: 2
  • Forks: 2
  • Open Issues: 2
  • Releases: 11
Topics
docker
Created almost 3 years ago · Last pushed 8 months ago
Metadata Files
Readme License Citation

README.md

docker-rundocker run and docker exec with useful defaults

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.

[!IMPORTANT]
This repository is open-sourced and maintained by the Institute for Automotive Engineering (ika) at RWTH Aachen University.
DevOps, Containerization and Orchestration of Software-Defined Vehicles are some of many research topics within our Vehicle Intelligence & Automated Driving domain.
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!
:email: opensource@ika.rwth-aachen.de

While docker-run can be used with any Docker image, we recommend to also check out our other tools for Docker and ROS. - docker-ros automatically builds minimal container images of ROS applications - docker-ros-ml-images provides machine learning-enabled ROS Docker images

Quick Demo

The 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.

bash docker-run --verbose 607qwq/xeyes

Functionality

docker-run is designed to be used the same way as the official docker run and docker exec commands.

In general, you can pass the same arguments to docker-run as you would pass to docker run, e.g.

bash docker-run --volume $(pwd):/volume ubuntu ls /volume

In 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. - container removal after exit (--rm) - interactive tty (--interactive --tty) - current directory name as container name (--name) - relative bind mounts (--volume [./RELATIVE_PATH>]:[TARGET_PATH]) - GPU support (--gpus all / --runtime nvidia) - X11 GUI forwarding

If 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.

bash docker-run --name my-running-container

Unlike with docker run, you can also set the Docker image via the --image arguments, see Usage. This may be required for more complex use cases.

Installation

```bash pip install docker-run-cli

(optional) shell auto-completion

source $(activate-python-docker-run-shell-completion 2> /dev/null) ```

[!WARNING]
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)
bash echo "export PATH=\$HOME/.local/bin:\$PATH" >> ~/.bashrc source ~/.bashrc

Usage

``` usage: docker-run [--help] [--image IMAGE] [--loc] [--mwd] [--name NAME] [--no-gpu] [--no-it] [--no-name] [--no-rm] [--no-tz] [--no-x11] [--verbose] [--version]

Executes docker run with the following features enabled by default, each of which can be disabled individually: container removal after exit, interactive tty, current directory name as container name, GPU support, X11 GUI forwarding. Passes any additional arguments to docker run. Executes docker exec instead if a container with the specified name (--name) is already running.

options: --help show this help message and exit --image IMAGE image name (may also be specified without --image as last argument before command) --loc enable automatic locale --mwd mount current directory at same path --name NAME container name; generates docker exec command if already running --no-gpu disable automatic GPU support --no-it disable automatic interactive tty --no-name disable automatic container name (current directory) --no-rm disable automatic container removal --no-tz disable automatic timezone --no-x11 disable automatic X11 GUI forwarding --verbose print generated command --version show program's version number and exit ```

Plugins

docker-run can be extended through plugins. Plugins are installed as optional dependencies.

```bash

install specific plugin

pip install docker-run-cli[]

install all plugins

pip install docker-run-cli[plugins] ```

| Plugin | Description | | --- | --- | | docker-ros | extra functionality for Docker images built by docker-ros |

Owner

  • Name: Institut für Kraftfahrzeuge, RWTH Aachen, ika
  • Login: ika-rwth-aachen
  • Kind: organization
  • Location: Aachen, Germany

Citation (CITATION.cff)

cff-version: 1.2.0
message: "We hope that our tools can help your research. If this is the case, please cite it using the following metadata."

title: dorotos
type: software
repository-code: "https://github.com/ika-rwth-aachen/docker-run"
date-released: 2023-05-28
authors:
  - given-names: Jean-Pierre
    family-names: Busch
  - given-names: Lennart
    family-names: Reiher

preferred-citation:
  title: "Enabling the Deployment of Any-Scale Robotic Applications in Microservice-Based Service-Oriented Architectures through Automated Containerization"
  type: conference-paper
  conference:
    name: "2024 IEEE International Conference on Robotics and Automation (ICRA)"
  year: 2024
  pages: "17650-17656"
  doi: "10.1109/ICRA57147.2024.10611586"
  url: "https://ieeexplore.ieee.org/document/10611586"
  authors:
    - given-names: Jean-Pierre
      family-names: Busch
      orcid: "https://orcid.org/0009-0000-1417-0463"
    - given-names: Lennart
      family-names: Reiher
      orcid: "https://orcid.org/0000-0002-7309-164X"
    - given-names: Lutz
      family-names: Eckstein

GitHub Events

Total
  • Create event: 3
  • Release event: 2
  • Issues event: 1
  • Watch event: 8
  • Delete event: 3
  • Push event: 11
  • Pull request review comment event: 3
  • Pull request review event: 3
  • Pull request event: 3
Last Year
  • Create event: 3
  • Release event: 2
  • Issues event: 1
  • Watch event: 8
  • Delete event: 3
  • Push event: 11
  • Pull request review comment event: 3
  • Pull request review event: 3
  • Pull request event: 3

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 204
  • Total Committers: 5
  • Avg Commits per committer: 40.8
  • Development Distribution Score (DDS): 0.407
Past Year
  • Commits: 18
  • Committers: 1
  • Avg Commits per committer: 18.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Lennart Reiher l****r@i****e 121
Jean-Pierre Busch j****h@i****e 79
Raphael van Kempen r****n@i****e 2
Fabian Thomsen f****n@i****e 1
Patrick Peltzer p****r@f****e 1
Committer Domains (Top 20 + Academic)

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 2
  • Total pull requests: 15
  • Average time to close issues: 5 months
  • Average time to close pull requests: about 20 hours
  • Total issue authors: 2
  • Total pull request authors: 3
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.07
  • Merged pull requests: 13
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 1
  • Pull requests: 5
  • Average time to close issues: N/A
  • Average time to close pull requests: about 10 hours
  • Issue authors: 1
  • Pull request authors: 2
  • Average comments per issue: 0.0
  • Average comments per pull request: 0.0
  • Merged pull requests: 3
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • akloeker (1)
  • jpbusch (1)
Pull Request Authors
  • lreiher (13)
  • jpbusch (3)
  • PPeltzerFka (1)
Top Labels
Issue Labels
bug (1)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 335 last-month
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 0
    (may contain duplicates)
  • Total versions: 21
  • Total maintainers: 3
pypi.org: docker-run-docker-ros

docker-run plugin for Docker images built by docker-ros

  • Documentation: https://docker-run-docker-ros.readthedocs.io/
  • License: MIT License Copyright (c) 2023-2024 Institute for Automotive Engineering (ika), RWTH Aachen University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 1.0.8
    published 8 months ago
  • Versions: 9
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 97 Last month
Rankings
Dependent packages count: 7.3%
Average: 24.3%
Dependent repos count: 41.4%
Maintainers (3)
Last synced: 6 months ago
pypi.org: docker-run-cli

'docker run' and 'docker exec' with useful defaults

  • Documentation: https://docker-run-cli.readthedocs.io/
  • License: MIT License Copyright (c) 2023-2024 Institute for Automotive Engineering (ika), RWTH Aachen University Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
  • Latest release: 0.10.1
    published 8 months ago
  • Versions: 12
  • Dependent Packages: 1
  • Dependent Repositories: 0
  • Downloads: 238 Last month
Rankings
Dependent packages count: 7.3%
Average: 26.8%
Stargazers count: 28.3%
Forks count: 30.5%
Dependent repos count: 41.4%
Maintainers (3)
Last synced: 6 months ago