{"id":31646152,"url":"https://github.com/codefresh-io/remote-docker","last_synced_at":"2025-10-07T05:20:39.352Z","repository":{"id":18491973,"uuid":"83299998","full_name":"codefresh-io/remote-docker","owner":"codefresh-io","description":"A Docker container to securely control a remote docker daemon CLI using ssh forwarding, no SSL setup needed.","archived":false,"fork":false,"pushed_at":"2022-06-14T18:24:14.000Z","size":21,"stargazers_count":16,"open_issues_count":7,"forks_count":12,"subscribers_count":14,"default_branch":"master","last_synced_at":"2025-04-25T14:59:43.534Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/codefresh-io.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}},"created_at":"2017-02-27T10:53:24.000Z","updated_at":"2024-10-25T20:26:04.000Z","dependencies_parsed_at":"2022-09-16T00:12:41.203Z","dependency_job_id":null,"html_url":"https://github.com/codefresh-io/remote-docker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/codefresh-io/remote-docker","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fremote-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fremote-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fremote-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fremote-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codefresh-io","download_url":"https://codeload.github.com/codefresh-io/remote-docker/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codefresh-io%2Fremote-docker/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278722757,"owners_count":26034463,"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","status":"online","status_checked_at":"2025-10-07T02:00:06.786Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-10-07T05:20:28.509Z","updated_at":"2025-10-07T05:20:39.347Z","avatar_url":"https://github.com/codefresh-io.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# remote-docker\n\n#### Build\n[![Codefresh build status]( https://g.codefresh.io/api/badges/build?repoOwner=codefresh-io\u0026repoName=remote-docker\u0026branch=master\u0026pipelineName=remote-docker\u0026accountName=codefresh-inc\u0026type=cf-2)]( https://g.codefresh.io/repositories/codefresh-io/remote-docker/builds?filter=trigger:build;branch:master;service:58b405b7a6eaef0100345945~remote-docker)\n\n#### Image\n[![](https://images.microbadger.com/badges/image/codefresh/remote-docker.svg)](http://microbadger.com/images/codefresh/remote-docker) [![](https://images.microbadger.com/badges/version/codefresh/remote-docker.svg)](http://microbadger.com/images/codefresh/remote-docker) [![](https://images.microbadger.com/badges/commit/codefresh/remote-docker.svg)](http://microbadger.com/images/codefresh/remote-docker) \n\nA Docker container to securely control a remote docker daemon CLI using ssh forwarding, no SSL setup needed.\n\n## Setup\n\nIn order to use `remote-docker` with your Docker server, you need to configure SSH-key based authentication for your Docker server machine. There are lots of tutorials available: you can use [this](https://www.digitalocean.com/community/tutorials/how-to-configure-ssh-key-based-authentication-on-a-linux-server) for example.\n\nYou should add you SSH public key to your Docker server and keep private key for using in `remote-docker` container. You can pass this key either as file (using `-v` option) or as environment variable (`-e SSH_KEY=...`). \n\nFrom now on, you should be able to run any `docker` command on your server through SSH tunneling. \n\n## Usage\n\nLets assume you want to control the docker daemon on your `webserver.com` server. You need to run a `codefresh/remote-docker` Docker container, passing `ssh` private key file to it, like this:\n\n    $ docker run -it --rm -v ${HOME}/.ssh/id_rdocker:/root/.ssh/id_rdocker codefresh/remote-docker rdocker user@webserver.com\n\nOr you can pass `ssh` key as the environment variable (assuming you've setup `SSH_KEY`)\n\n    $ docker run -it --rm -e SSH-KEY=${SSH_KEY} codefresh/remote-docker rdocker user@webserver.com\n\nThis will open a new `bash` session, within the `codefresh/remote-docker` container, with a new `DOCKER_HOST` variable setup. Any `docker` command you execute will take place on the remote docker daemon.\nTo test the connection run:\n\n    docker:user@webserver.com bash-4.3# docker info\n\nCheck the `Name:` field it should have the remote hostname .... That's it!!!\n\nYou could for example run `docker build` to build an image on the remote host and then `docker save -o myimage.tar image_name` to store it locally.\nOr run `docker exec -it container_name bash` to open a shell session on a remote container. Even bash auto-completion works ok.\n\nTo stop controlling the remote daemon and close the ssh forwarding, just exit the newly created bash session (press `Ctrl+D`).\n\nYou can also execute any `docker` command directly, without openning a `bash` shell in the `codefresh/remote-docker` container.\n\n    $ docker run -it --rm -v ${HOME}/.ssh/id_rdocker:/root/.ssh/id_rdocker codefresh/remote-docker rdocker user@webserver.com docker info\n\n### Custom SSH port\n\nRedefine `SSH_PORT` environment variable if you are using a different port than `22` (set by default).\n\n## Used software\n\n- Copy of `rdocker.sh` script (MIT license) from (dvddarias/rdocker)[https://github.com/dvddarias/rdocker]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fremote-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodefresh-io%2Fremote-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodefresh-io%2Fremote-docker/lists"}