{"id":20483669,"url":"https://github.com/cbuschka/docker-user-adapting-entrypoint","last_synced_at":"2026-04-28T09:36:39.966Z","repository":{"id":95275670,"uuid":"103135982","full_name":"cbuschka/docker-user-adapting-entrypoint","owner":"cbuschka","description":"Proof of Concept - User adapting Entrypoint for Docker","archived":false,"fork":false,"pushed_at":"2018-01-22T18:51:43.000Z","size":3,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-05T16:17:24.701Z","etag":null,"topics":["docker","entrypoint","userns-remap"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/cbuschka.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":"license","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":"2017-09-11T12:56:58.000Z","updated_at":"2017-09-11T13:22:29.000Z","dependencies_parsed_at":"2023-04-13T00:03:46.637Z","dependency_job_id":null,"html_url":"https://github.com/cbuschka/docker-user-adapting-entrypoint","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/cbuschka/docker-user-adapting-entrypoint","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Fdocker-user-adapting-entrypoint","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Fdocker-user-adapting-entrypoint/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Fdocker-user-adapting-entrypoint/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Fdocker-user-adapting-entrypoint/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cbuschka","download_url":"https://codeload.github.com/cbuschka/docker-user-adapting-entrypoint/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cbuschka%2Fdocker-user-adapting-entrypoint/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262570008,"owners_count":23330326,"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","entrypoint","userns-remap"],"created_at":"2024-11-15T16:18:26.369Z","updated_at":"2026-04-28T09:36:39.908Z","avatar_url":"https://github.com/cbuschka.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# User adapting Entrypoint for Docker\n\nOriginal [repository](https://github.com/cbuschka/docker-user-adapting-entrypoint) at github.\n\n## What does it solve?\n\n### Problem\n* run container with current host user uid/gid (\"worker user\")\n* how provide home directory when uid/gid of worker user not known at build time\n* how to grant access to docker.socket to worker user\n\n### Solution\n - run container and entrypoint as root\n - create user/group entry for worker user on startup\n - add user to docker group when docker.sock provided\n - execute command as worker user\n\n## Build\n```\ndocker build --tag docker-user-adapting-entrypoint:local .\n```\n\n## Run\n```\n# WORKER_ vars are optional\ndocker run -ri --rm \\\n\t-e WORKER_UID=$(id -u) \\\n\t-e WORKER_GID=$(id -g) \\\n\t-e WORKER_HOME=/home/sweethome \\\n\t-e WORKER_NAME=wrkr \\\n\t-v volume-in-work-dir:/work \\\n\tdocker-user-adapting-entrypoint:local bash\n```\n\n## Run (with docker access from within container)\n```\n# WORKER_ vars are optional\ndocker run -ri --rm \\\n\t-e WORKER_UID=$(id -u) \\\n\t-e WORKER_GID=$(id -g) \\\n\t-e WORKER_HOME=/home/sweethome \\\n\t-e WORKER_NAME=wrkr \\\n\t-v volume-in-work-dir:/work \\\n\t-v /var/run/docker.sock:/var/run/docker.sock \\\n\tdocker-user-adapting-entrypoint:local bash\n```\n\n\n## License\nWritten by [Cornelius Buschka](https://github.com/cbuschka).\n\n[MIT License](license)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbuschka%2Fdocker-user-adapting-entrypoint","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcbuschka%2Fdocker-user-adapting-entrypoint","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcbuschka%2Fdocker-user-adapting-entrypoint/lists"}