Live data from Hacker News

Dockerizing a Programming Language

bellmar.medium.com

11–17 of 17 posts

Re: Dockerizing a Programming Language

#11
post #8

Earlier quoted context omitted.

Docker is just another solution to the problem.

A cross platform solution, which is nice.

It's not "cross-platform" at all, since Docker builds on Linux containers. For example, the Docker applications for Windows and macOS just run a Linux VM behind the scenes.

AFAIK you can't run Windows binaries using Docker, even if you're using Windows, since it's running in a Linux VM; likewise for macOS binaries on macOS, Solaris on Solaris, etc.

Re: Dockerizing a Programming Language

#12
OP is using Docker + Make in a similar way to how I was a few years ago, before I started using Toast (https://github.com/stepchowfun/toast). Toast lets you define tasks like you would with Make (without all the hairy gotchas of Makefiles), but it runs them inside Docker containers for better portability/reproducibility.

Re: Dockerizing a Programming Language

#13

Earlier quoted context omitted.

A cross platform solution, which is nice.

It's not "cross-platform" at all, since Docker builds on Linux containers. For example, the Docker applications for Windows and macOS just run a Linux VM behind the scenes. AFAIK you can't run Windows binaries using Docker, even if you're using Windows, since it's running in a Linux VM; likewise for macOS binaries on macOS, Solaris on Solaris, etc.

Docker on WSL2 kind-of runs on the host, though.

Re: Dockerizing a Programming Language

#15

Earlier quoted context omitted.

It's not "cross-platform" at all, since Docker builds on Linux containers. For example, the Docker applications for Windows and macOS just run a Linux VM behind the scenes. AFAIK you can't run Windows binaries using Docker, even if you're using Windows, since it's running in a Linux VM; likewise for macOS binaries on macOS, Solaris on Solaris, etc.

Docker on WSL2 kind-of runs on the host, though.

WSL1 as far as I understand works like wine, transpiling calls to NT. But isn't WSL2 just a VM?

Re: Dockerizing a Programming Language

#16

OP is using Docker + Make in a similar way to how I was a few years ago, before I started using Toast ( https://github.com/stepchowfun/toast ). Toast lets you define tasks like you would with Make (without all the hairy gotchas of Makefiles), but it runs them inside Docker containers for better portability/reproducibility.

I see the benefit of Toast (or Make) if you aren't writing your own container and just want to add a couple of things to an existing container (eg a CI pipeline).. but if you are building a container, including them in the Dockerfile makes more sense, no?

In this particular case it looks like the author is reusing the makefiles used from other builds ("you should also be able to build the compiler from source and run it outside of the container") rather than duplicating the work, and she finds makefiles "to be soothing".

Post reply on HN