4 ms·
I got a new MacBook Pro from work a couple of months ago, and decided to try a scaled back version of this. You can’t reasonably run graphical apps in Docker on
by larrywright 8y ago
I got a new MacBook Pro from work a couple of months ago, and decided to try a scaled back version of this. You can’t reasonably run graphical apps in Docker on MacOS, but most of the CLI tools that I would install via HomeBrew can be run in Docker. I took the same approach that Jess did, and set up a a shell alias for these commands. That way I run the command the way I would normally run it from Terminal.app, but the app isn’t installed at all on my host.
To be clear: I have no real reason to do this, other than to just see how it works. It’s nice to know that if I got a new machine tomorrow, all of the CLI stuff I need is defined in some Dockerfiles and bash aliases, and could be reinstalled pretty quickly. There are other ways to do that, but it’s a fun experiment. In practice, there’s really very little noticeable overhead to running things this way on modern hardware, but I’m also not running things in tight loops where that overhead would matter.
If you’re curious at all about this, Jess has a couple of Github repos worth looking at:
https://github.com/jessfraz/dockerfiles/ https://github.com/jessfraz/dockerfiles/
https://github.com/jessfraz/dotfiles https://github.com/jessfraz/dotfiles
Specifically, her aliases are set up here: https://github.com/jessfraz/dotfiles/blob/master/.dockerfunc https://github.com/jessfraz/dotfiles/blob/master/.dockerfunc
- liveoneggs 8y agoI run as much python/node/ruby/whatever inside of containers as possible but packaging up something like vim would probably just make me angry with the little startup delays :)