Skip to content

Instantly share code, notes, and snippets.

@korof
Forked from dnaprawa/README.md
Created November 18, 2020 09: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 korof/da0e8442dec5b96c30d4aeabd5b68f8e to your computer and use it in GitHub Desktop.
Save korof/da0e8442dec5b96c30d4aeabd5b68f8e to your computer and use it in GitHub Desktop.
Apple M1 workaround for Docker

Apple M1 workaround for Docker

Prerequisites

You need a dedicated Linux machine (linux-vm) (in the cloud or on your VPS, or bare-metal) with Docker installed and SSH enabled (required login using SSH keys).

Workaround for people who have SSH access to a docker installed linux machine

Install go (pre-compiled binaries at https://golang.org/dl/

(Edit: there are no Darwin arm64 yet, You need to compile or use Homebrew...)

Open terminal and execute:

go get -u -v github.com/docker/cli/cmd/docker

Set a docker context

with:

docker context create linux-vm --docker host=ssh://user@host

Switch to context:

docker context use linux-vm

Issue commands as you normally would...

Or you can directly use an environment variable:

export DOCKER_HOST=ssh://user@host
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment