Skip to content

Instantly share code, notes, and snippets.

@falexandrou
Created April 14, 2021 23:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save falexandrou/523e12b81036128f6d845c5c94a84cfb to your computer and use it in GitHub Desktop.
Save falexandrou/523e12b81036128f6d845c5c94a84cfb to your computer and use it in GitHub Desktop.
Run docker daemon via SSH
# You can use a docker daemon via SSH
# Here's how you'd run a container via SSH
$ docker -H ssh://<username>:<server> -it alpine date
# For convenience, this can be aliased as follows:
# (I use rdocker — as in remote docker)
$ alias rdocker="docker -H myusername@myserver"
# Example:
$ rdocker run -it alpine date
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment