Skip to content

Instantly share code, notes, and snippets.

@dnaprawa
Last active August 16, 2022 16:08
Show Gist options
  • Save dnaprawa/a3d3a405a9e5ed9971b2205580312516 to your computer and use it in GitHub Desktop.
Save dnaprawa/a3d3a405a9e5ed9971b2205580312516 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