Anyone already have a docker image set up for arm mac gfortran?

I’ve done some searching but haven’t found anything turnkey yet, so figured I’d ask before actually having to learn Docker.

I’m on an Apple Silicon MacBook Air and the lack of a working debugger is getting me down. I hope/assume/pray that I could set up a Linux container with gfortran and gdb and access it from Emacs. Anyone already have an image or dockerfile for this, or any gotchas I should know about?

Thanks.

I don’t use gdb or Emacs, but do use Docker on Apple Silicon (AS). For me it works as expected. For example, I use the xfig program to draw simple figures. It crashes on my Mac, but I made a minimal Docker Linux image with xfig that shows the xfig window via the xquarts server on my Mac.

Docker on AS builds arm64 images by default, but you can create amd64 images also. The amd64 images run on Intel machines, including Windows. On AS the amd64 images run under Rosetta2. I can even install OneAPI in an amd64 Linux image and use Intel Fortran as long as you do not use AVX instructions. Intel Fortran in an amd64 image also does not seem to support mult-threading. So I only use it for testing my code with Intel Fortran on Linux.

You could also install multipass, then a virtual Ubuntu instance and have gfortran, gdb, emacs and whatever you want inside it.

1 Like

Yeah, I was making this way too hard. VMs I get, but I’ve been out of the business for a decade and we never used anything like Docker. It’s easy peasy once I got past the terminology gap. I still have to decide where I put my working copy of code, but I’m leaning toward cloning the repo into the container and then running my emacs on the host.

Thanks for the replies.