4 ms·
I really don't understand why is this fuss. TBH docker-on-mac is not that good. That is why I've most minimal config and just using to have some 'linux' time t
by pvtmert 6y ago
I really don't understand why is this fuss.
TBH docker-on-mac is not that good. That is why I've most minimal config and just using to have some 'linux' time to time.
What I use is `docker context` command or DOCKER_HOST=ssh://user@host pattern.
env-var is more convenient for 'ephemeral' hosts. (It uses your own SSH-key to connect to host) And for static hosts (like staging machines) I use context.
Plus it uses native SSH client, so it supports ProxyJump or JumpServer or Bastion Host, forwarding, session-reuse, YubiKeys & whatnot.
So, I'd rather to have client on my laptop, having 1 or 2 medium sized hosts in Digitalocean, AWS, whatever place. (Some providers even gives you docker hosts with ssh access, like civo.com - disclaimer: I just started using them last weekend...)
PS: You cannot 'mount' your local folder to remote host. But you can 'build' your local folder on remote host. (Thanks to BuildKit / DOCKER_BUILDKIT=1)
Edit: I remembered that I've installed (compiled actually) docker-cli to my Android phone using Termux.
You can't run daemon at all. The client gives some warnings at the start saying some things not right. But it works with those methods & variables...
Hint:
$ go get -u -v github.com/docker/cli/cmd/docker
# profit...
- ithkuil 6y agoDocker for mac is slow that's true, but seamless filesystem and network forwarding means that exactly the same instructions work for linux and mac team mates
- jillesvangurp 6y agodocker is part of the workflow of a lot teams. Simply not optional for a lot of backend teams to have it around. The mac version is not perfect but I've used it for years without major headaches. I regularly run all sorts of middleware, build tooling, etc. using it.
- pvtmert 6y agoOne of the most forgotten thing is filesystem in macOS is case-insensitive while Linux it's case sensitive. Creates lots of headaches with mounted volumes (local vs staging, prod etc)
- lifty 6y agoIf you want a solution for syncing local dev files to a remote host I would encourage you to try mutagen. It works very well, even inside containers.
- pvtmert 6y agoThe point is not 'syncing' at all. Seamlessly deploy from the machine to the container & run it in a 'native' environment.