Socket
Book a DemoInstallSign in
Socket

docker-over-ssh

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

docker-over-ssh

Push docker containers efficiently over abitrary streams, e.g. ssh

Source
npmnpm
Version
1.2.0
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

docker-over-ssh

Push docker containers efficiently over abitrary streams, e.g. ssh

Installation

On both your local machine, and the remote machine you want to transfer an image to:

npm i -g docker-over-ssh

Usage

To transfer an image called node:12-alpine to a server called dokku over ssh, run:

docker-over-ssh push node:12-alpine ssh dokku "docker-over-ssh pull node:12-alpine"

How it works

The local CLI sets up a temporary docker registry (itself made using docker). It then pushes the requested image (and only the requested image) to that docker registry. It then spawns a child process, using the remaining params. In this example, that's ssh dokku "docker-over-ssh pull node:12-alpine". It proxies connections over stdio <-> TCP between that child process and the temporary docker registry.

The remote CLI sets up a TCP server that proxies requests through to stdio (i.e. through to the local CLI's docker registry). It then runs docker pull, which pulls any missing layers over the ssh connection.

This is useful, because it can take advantage of the docker layer caching for much smaller transfers.

FAQs

Package last updated on 08 Nov 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts