Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Probably it will be a good idea to create installable script for using docker image #69

Open
twaik opened this issue Oct 9, 2024 · 1 comment

Comments

@twaik
Copy link
Member

twaik commented Oct 9, 2024

I wrote this one

#!/bin/bash
if [ "$#" -eq "0" ]; then
	set -- bash
fi

docker start termux-docker >/dev/null 2>&1 || \
	docker run --detach --init --name termux-docker -it termux/termux-docker:latest
docker exec -itu system termux-docker "$@"

Using this I can invoke termux commands from my regular shell like this.

termux apt-file search xcb-image.pc

Or simply enter termux environment with termux command.

@robertkirkman
Copy link

This scenario is very generic, not just to Docker in general, but to containers in general as a whole, one of the most common examples of which is Distrobox, which is a wrapper around Docker and/or Podman that sort of already implements that concept generically in a container-agnostic way.
https://github.com/89luca89/distrobox/blob/main/docs/usage/distrobox-enter.md#examples

distrobox-enter my-container -- echo 'example'

Does that make this a little bit out of scope, since it seems like the "generic solution" would simply be for the user to import the container to a Distrobox configuration and then use the Distrobox wrapper features to do almost exactly the same thing you described?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants