Live data from Hacker News

LXD containers on macOS at near-native speeds

beringresearch.github.io

131–134 of 134 posts

Re: LXD containers on macOS at near-native speeds

#131

Earlier quoted context omitted.

Because docker for Mac has always kind of sucked, I’ve moved on to making nix-based development environments and I’ve been very pleased so far. Lately I’ve been trying https://devenv.sh/ and it works great! I haven’t tried it for ruby, though I have used vanilla nix shell for ruby projects before and it worked quite well after I over-rode GEM_PATH and GEM_HOME to the correct values.

I've been using Colima lately and it's been a great experience. The only thing that didn't quite work was pushing an image to AWS ECR, but pulling images, building images (with BuildKit), and running containers all worked fine, and faster than Docker.

I hadn't heard of Colima before seeing your comment, decided to give it a whirl and it's a breath of fresh air. Much faster and uses less resources. Thanks!

Re: LXD containers on macOS at near-native speeds

#133
post #94

Earlier quoted context omitted.

Would you elaborate on the setup? I recall seeing a comment or article where Mitchell mentioned this setup previously. I’ve been using Make + Docker for development on macOS for a long time now and perhaps it’s time for a change. I’ve looked at nix once or twice over the years but it never really clicked.

Sure, this is a super abbreviated version of my current setup for developing https://notado.app shell.nix - this brings the packages I need to develop into the $PATH when I run `nix-shell` in the repo {pkgs ? import {}}: with pkgs; mkShell { buildInputs = [ meilisearch openssl overmind pkg-config postgresql rustup tmux ]; shellHook = '' export OVERMIND_PROCFILE=Procfile.dev export PGDATA="data.pg" export MEILI_DB_PAT…

this is great, and I never heard of Overmind until now (looks cool!) but you could also flake this config out and get a couple more perks, like possibly not having to use the nix-versions thing

Re: LXD containers on macOS at near-native speeds

#134

Earlier quoted context omitted.

It's less than perfect and being worked on afaik... Main thing to avoid are any volume mounts to the host environment. Declare/use volume containers in your docker-compose.yaml, will help a lot, but still more sluggish than host/native. If you use VS Code the remoting extensions pack includes SSH, for my personal laptop, I'm usually using code to my linux desktop, and editing remotely... it's pretty slick. Code will…

I'm thinking about giving this a try but using an iPad connected to a monitor setup for this. I rarely code on the go for personal use, so this could work pretty well...

There are codium forks that will host a web server environment for you... easy enough to VPN home, or another trusted environment, and use a code(ium) server on your host.
Post reply on HN