{"id":21889869,"url":"https://github.com/rdyro/guest_container_tool","last_synced_at":"2025-06-26T10:36:02.538Z","repository":{"id":207465781,"uuid":"719319214","full_name":"rdyro/guest_container_tool","owner":"rdyro","description":"This basic tool allows you to give others access to your computational resources inside an isolated container, without access to your server or other containers.","archived":false,"fork":false,"pushed_at":"2023-11-21T19:30:14.000Z","size":70,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-22T02:42:58.577Z","etag":null,"topics":["compute","container","docker","guest","ssh"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/rdyro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-11-15T23:10:32.000Z","updated_at":"2023-11-18T21:57:09.000Z","dependencies_parsed_at":"2023-11-16T00:26:05.331Z","dependency_job_id":"d5497ac8-dd51-4215-957f-f31c0b67fd6c","html_url":"https://github.com/rdyro/guest_container_tool","commit_stats":null,"previous_names":["rdyro/guest_container_tool"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/rdyro/guest_container_tool","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdyro%2Fguest_container_tool","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdyro%2Fguest_container_tool/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdyro%2Fguest_container_tool/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdyro%2Fguest_container_tool/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rdyro","download_url":"https://codeload.github.com/rdyro/guest_container_tool/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rdyro%2Fguest_container_tool/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262049395,"owners_count":23250742,"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":["compute","container","docker","guest","ssh"],"created_at":"2024-11-28T11:27:28.128Z","updated_at":"2025-06-26T10:36:02.522Z","avatar_url":"https://github.com/rdyro.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Persistent Guest Container Tool\n\n\n\u003cp align=\"center\"\u003e\n  \u003cimg src=\"infographic.png\" style=\"width:50%;max-width:500px\"/\u003e\n\u003c/p\u003e\n\nThis tool allows you to create a persistent guest container on a server: you can\ncreate a (docker) container for a temporary user that can be accessed via SSH on\na random or selected port.\n\nThis basic tool allows you to give others access to your computational resources\ninside an isolated container, without access to your server or other containers.\n\n# Quickstart\n\nOn the server\n```bash\n$ python3 guest_container_tool.py --help\n$ python3 guest_container_tool.py -u rdyro -k \"$(cat ~/.ssh/id_rsa.pub)\" -c ubuntu -p 2222\n$ ssh -p 2222 rdyro@localhost # you're now in the container\n```\n\n# Setup\n\n## `docker` setup\n\nMake sure your user account can use `docker` without sudo, in the `docker` group:\n\n```bash\n$ sudo usermod -aG docker $USER\n$ # Log out and log back in or run\n$ newgrp docker\n```\n\n## Help and usage\n\n```bash\nusage: guest_container_tool.py [-h] [-u USERNAME] [-p PORT] [-k PUBLIC_KEY_STR]\n                               [-c CONTAINER_IMAGE] [-g GPUS] [-n]\n                               [-H REVERSE_PROXY_HOST] [--config CONFIG]\n                               [--extra-docker-run-args EXTRA_DOCKER_RUN_ARGS]\n\noptions:\n  -h, --help            show this help message and exit\n  -u USERNAME, --username USERNAME\n                        username\n  -p PORT, --port PORT  port\n  -k PUBLIC_KEY_STR, --public-key-str PUBLIC_KEY_STR\n                        Public RSA key as a string\n  -c CONTAINER_IMAGE, --container-image CONTAINER_IMAGE\n                        Container image name (e.g., from docker hub\n                        `ubuntu:latest`)\n  -g GPUS, --gpus GPUS  Whether and what GPUs to pass to docker\n  -n, --dry-run         Dry run, do not run the container.\n  -H REVERSE_PROXY_HOST, --reverse-proxy-host REVERSE_PROXY_HOST\n                        (Optionally) Host to use for reverse proxy. If\n                        complicated, use ~/.ssh/config to set up a host alias.\n  --config CONFIG       Path to a JSON config file as an alternative to command\n                        line arguments.\n  --extra-docker-run-args EXTRA_DOCKER_RUN_ARGS\n                        Extra arguments to pass to docker run -- when creating the\n                        persistent container.\n```\n\n## Using a JSON config file instead\n\nInstead of using the command line arguments, you can also make a simple JSON\nfile that mirrors the command line arguments.\n\n`example_config.json`:\n```\n{\n  \"username\": \"rdyro\",\n  \"public_key_str\": \"ssh-rsa ...\",\n  \"container_name\": \"ubuntu\"\n}\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdyro%2Fguest_container_tool","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frdyro%2Fguest_container_tool","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frdyro%2Fguest_container_tool/lists"}