From 861648c1476bb93536c46e62c5625167f8e243d8 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Busch Date: Fri, 9 Jun 2023 11:03:32 +0200 Subject: [PATCH 1/5] do not exit if user not in docker group --- docker-run/scripts/docker-run | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/docker-run/scripts/docker-run b/docker-run/scripts/docker-run index 00ce858..01e7ea4 100755 --- a/docker-run/scripts/docker-run +++ b/docker-run/scripts/docker-run @@ -11,13 +11,12 @@ if [[ $OS != "Darwin" ]]; then echo "User '${USER}' must be in 'docker' group to run containers." echo "User can be added via: sudo usermod -aG docker ${USER}" echo "Afterwards, the user may need to logout and login again." - exit 1 fi fi # check operating system and architecture if ! { [[ $OS = "Linux" && $ARCH = "x86_64" ]] || [[ $OS = "Darwin" && $ARCH = "arm64" ]] || [[ $OS = "Linux" && $ARCH = "aarch64" ]]; }; then - >&2 echo "This script does not support $OS with $ARCH architecture." + >&2 echo "docker-run does not support $OS with $ARCH architecture." exit 1 fi From 1ec11521b4eb65ba4c83125596c8efb082fbd862 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Busch Date: Fri, 9 Jun 2023 11:03:44 +0200 Subject: [PATCH 2/5] run cmd with python3 --- docker-run/scripts/docker-run | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-run/scripts/docker-run b/docker-run/scripts/docker-run index 01e7ea4..ca238de 100755 --- a/docker-run/scripts/docker-run +++ b/docker-run/scripts/docker-run @@ -22,7 +22,7 @@ fi # generate docker run/exec command CMD_FILE=$(mktemp) -python -m docker_run "${@}" 2>&1 >$CMD_FILE +python3 -m docker_run "${@}" 2>&1 >$CMD_FILE CMD=$(cat $CMD_FILE) rm $CMD_FILE From c35d1585e32d01c8503ae054c33db58d519a7050 Mon Sep 17 00:00:00 2001 From: Jean-Pierre Busch Date: Fri, 9 Jun 2023 11:03:58 +0200 Subject: [PATCH 3/5] add installation note to readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 5f5ca25..72d235f 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,8 @@ pip install docker-run-cli source $(activate-python-docker-run-shell-completion 2> /dev/null) ``` + > Note: + > *pip* installs scripts into `~/.local/bin` and this is not on the default *Debian/Ubuntu* `$PATH`. To run `docker-run`, please make sure its in your `$PATH`. E.g. by running `$PATH=$PATH:~/.local/bin`. ## Usage From cea6b6dec6008c8a6e17bcc828b531d8ea6255c4 Mon Sep 17 00:00:00 2001 From: Lennart Reiher Date: Sat, 10 Jun 2023 19:07:00 +0200 Subject: [PATCH 4/5] improve note on pip install path closes #14 --- README.md | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 72d235f..6961563 100644 --- a/README.md +++ b/README.md @@ -63,8 +63,13 @@ pip install docker-run-cli source $(activate-python-docker-run-shell-completion 2> /dev/null) ``` - > Note: - > *pip* installs scripts into `~/.local/bin` and this is not on the default *Debian/Ubuntu* `$PATH`. To run `docker-run`, please make sure its in your `$PATH`. E.g. by running `$PATH=$PATH:~/.local/bin`. +> **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)*](https://packaging.python.org/en/latest/tutorials/installing-packages/#installing-to-the-user-site) +> ```bash +> echo "export PATH=$HOME/.local/bin:$PATH" >> ~/.bashrc +> source ~/.bashrc +> ``` + ## Usage From b8186e4b287372de733ddaa6e51be910f3be4fc5 Mon Sep 17 00:00:00 2001 From: Lennart Reiher Date: Sat, 10 Jun 2023 19:11:57 +0200 Subject: [PATCH 5/5] bump version to 0.9.2 --- docker-run/pyproject.toml | 2 +- docker-run/src/docker_run/__init__.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docker-run/pyproject.toml b/docker-run/pyproject.toml index 6a85673..c2fbc2c 100644 --- a/docker-run/pyproject.toml +++ b/docker-run/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "docker-run-cli" -version = "0.9.1" +version = "0.9.2" description = "'docker run' and 'docker exec' with useful defaults" license = {file = "LICENSE"} readme = "README.md" diff --git a/docker-run/src/docker_run/__init__.py b/docker-run/src/docker_run/__init__.py index 8d26a9f..5143f87 100644 --- a/docker-run/src/docker_run/__init__.py +++ b/docker-run/src/docker_run/__init__.py @@ -1,2 +1,2 @@ __name__ = "docker-run" -__version__ = "0.9.1" \ No newline at end of file +__version__ = "0.9.2" \ No newline at end of file