Member-only story
How To Attach Visual Studio Code To A Running Docker Container
Yet Another Thing I Didn’t Know VSCode Could Do Automagically
These past two weeks I’ve been primarily preoccupied with getting some old code running on a flashy new M1 MacBook. The new MacBooks are awesome, but as we all well know: Apple products are not designed for peasants like me who value such lowly concepts as backwards compatibility…
Docker to the Rescue
We already use Docker for our CI/CD pipeline, so it was naturally the first thing we tried after losing a few days to battling with Python versions that refuse to build on ARM platforms. Once we got everything building, all tests passing and the deployments successful from within the Docker container running on my MacBook — requiring the --platform linux/amd64 arguments, which actually comes with a warning not to expect too much — I experimented with getting the same thing working over UTM, but was unfortunately met with abysmal failures trying to run a virtual machine with x64 architecture.
I haven’t have the opportunity yet to experiment with other solutions, but UTM was the recommended one (according to a number of articles and forum threads) and running on the same Docker image as our CI/CD pipeline has the additional benefit of ensuring that…