That means I had to get ssh to work with my container because that is how vagrant expects to establish a shell inside of the VM. The difference here is that normally you would use the docker exec command to establish a shell inside the container but I needed these containers to behave exactly like a virtual machine (VM) because I didn’t want students or developers with Apple M1 Macs to have a different experience than those on an Intel Mac or Windows computer. I plan to cover that in a future article. In fact, if you use Visual Studio Code, there is an extension called Remote Containers that allows you to develop in containers. The concept of using Docker as a development environment is not new. As with all technology, there are always use cases beyond the original intent and I was about to learn if this use case was viable. This is somewhat of a unique use case for Docker because the intent of Docker is to provide a consistent, immutable runtime environment not to be treated like a virtual machine. This means that Vagrant can control the provisioning of Docker containers just like it controls VirtualBox for provisioning virtual machines. I also remembered that Vagrant supports Docker as a provider. I had heard that Docker had released a tech preview of Docker Desktop for Mac that runs on Apple Silicon. I need another solution and I needed it fast. ![]() As it turns out, 8 of my students showed up for the 2021 spring semester with Apple M1 Macs which meant that all of my labs based on VirtualBox were not going to work for them. I had selected VirtualBox because it was free and supports Mac, Linux, and Windows, but it only runs on Intel computers (x86_64 architecture) and Apple Silicon is ARM base (aarch64 architecture). That worked really well until Apple released their new 2020 Macs with Apple M1 Silicon chips based on the ARM architecture. ![]() In my article Creating Repeatable Development Environments, I showed how I use Vagrant as an orchestrator and VirtualBox as a provider of virtual machines for creating consistent development environments for my students and development teams.
0 Comments
Leave a Reply. |