{"id":13660382,"url":"https://github.com/brthor/docker-push-ssh","last_synced_at":"2025-11-01T09:30:21.463Z","repository":{"id":32975836,"uuid":"148399394","full_name":"brthor/docker-push-ssh","owner":"brthor","description":"Push docker images from your local machine to remote servers without the hassle.","archived":false,"fork":false,"pushed_at":"2022-01-15T19:42:10.000Z","size":37,"stargazers_count":131,"open_issues_count":8,"forks_count":20,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-17T08:12:15.013Z","etag":null,"topics":["automation","ci","deployment","docker","docker-push","kubernetes","ssh"],"latest_commit_sha":null,"homepage":null,"language":"Python","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/brthor.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":"2018-09-12T00:51:36.000Z","updated_at":"2024-12-06T23:54:52.000Z","dependencies_parsed_at":"2022-08-07T19:16:02.941Z","dependency_job_id":null,"html_url":"https://github.com/brthor/docker-push-ssh","commit_stats":null,"previous_names":["coherenceapi/docker-push-ssh"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fdocker-push-ssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fdocker-push-ssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fdocker-push-ssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brthor%2Fdocker-push-ssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brthor","download_url":"https://codeload.github.com/brthor/docker-push-ssh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239269779,"owners_count":19610871,"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":["automation","ci","deployment","docker","docker-push","kubernetes","ssh"],"created_at":"2024-08-02T05:01:20.945Z","updated_at":"2025-11-01T09:30:21.240Z","avatar_url":"https://github.com/brthor.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"# docker-push-ssh\n[![PyPI version](https://badge.fury.io/py/docker-push-ssh.svg)](https://pypi.org/project/docker-push-ssh)\n[![Build Status](https://travis-ci.org/brthor/docker-push-ssh.svg?branch=master)](https://travis-ci.org/brthor/docker-push-ssh)\n\nPush docker images from your local machine to remote servers without the hassle.\n\n## Overview\n`docker-push-ssh` is a command line utility to push docker images from your local machine to your remote machine via ssh.\n\nIt creates a private docker registry on your server, establishes a ssh tunnel (so the registry is never exposed to the public),\nand uploads your docker image over this ssh tunnel.\n\nTested on OS X with \"Docker for Mac\".\n\n## Install\n\n1. Install via pip:\n`pip install docker-push-ssh`\n\n2. Add `localhost:5000` to your docker client's insecure registries (requires restart of docker):\n\n[[OS X] How to Add Insecure Registry](https://stackoverflow.com/questions/32808215/where-to-set-the-insecure-registry-flag-on-mac-os)\n\n[[Linux] How to Add Insecure Registry](https://stackoverflow.com/questions/42211380/add-insecure-registry-to-docker)\n\n\nAdding `localhost:5000` to your client's insecure registries is inconvenient but a side-effect of docker's design.\nIt only needs to be done once from each machine using `docker-push-ssh`. This allows the tool to push through the ssh\ntunnel at `localhost:5000` to the temporary registry on your remote host, without needing ssl certificates for your server.\n\n## Usage:\n\n```bash\n$ docker-push-ssh --help\nusage: cli.py [-h] [-i SSH_IDENTITY_FILE] [-p SSH_PORT] [-r REGISTRY_PORT]\n              [--prime-image PRIME_IMAGE]\n              ssh_host docker_image [docker_image ...]\n\nA utility to securely push a docker image from your local host to a remote\nhost over ssh without using docker save/load or needing to setup a private\nregistry.\n\npositional arguments:\n  ssh_host              Host to push docker image to. (ex.\n                        username@myhost.com)\n  docker_image          Docker image tag(s) to push. Specify one or more\n                        separated by spaces.\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i SSH_IDENTITY_FILE, --ssh-identity-file SSH_IDENTITY_FILE\n                        [required] Path to the ssh identity file on your local\n                        host. Required, password auth not supported.\n  -p SSH_PORT, --ssh-port SSH_PORT\n                        [optional] Port on ssh host to connect to. (Default is\n                        22)\n  -r REGISTRY_PORT, --registry-port REGISTRY_PORT\n                        [optional] Remote registry port on ssh host to forward\n                        to. (Default is 5000)\n  --prime-image PRIME_IMAGE\n                        [optional] [list] Base images with which to prime the\n                        registry from the remote host. Docker pull is\n                        performed on the remote host.\n```\n\n## Examples\n\nFirst create a test image we can use:\n```bash\n$ mkdir /tmp/testimage \u0026\u0026 cd /tmp/testimage\n$ echo \"FROM alpine\" \u003e\u003e ./Dockerfile\n$ echo \"RUN touch /etc/testimage\" \u003e\u003e ./Dockerfile\n$ docker build -t testimage .\n```\n\nNow push that test image to our remote server:\n```bash\n$ docker-push-ssh -i ~/my_identity_file root@myserver.com testimage\n...\n```\n\nNow the `testimage` will be present on your server.\n\n## Caveats\n\n1. SSH password authentication is not supported. Only key files.\n2. Password-protected SSH keys may not be supported. You can generate a temporary, non-protected key using `ssh-keygen -P \"\" -f /tmp/my-tmpkey`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrthor%2Fdocker-push-ssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrthor%2Fdocker-push-ssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrthor%2Fdocker-push-ssh/lists"}