4 ms·
I would hope that most people's production images are being built & pushed to an image repository in CI, not from somebody's laptop. A lot of the official base
by wfleming 6y ago
I would hope that most people's production images are being built & pushed to an image repository in CI, not from somebody's laptop.
A lot of the official base images on Docker Hub are dual architecture now (both x86-64 and arm64), so if devs on M1 can build arm64 images locally from those, develop on those, and then have CI build the production x86 image, things should be more or less fine.
Of course, I'm sure a lot of people rely on 3rd party base images that are still just x86-64. So I expect there's going to be a pretty painful transition period where Docker works on M1 Macs but a lot of popular images don't.
Or maybe Docker's official response will be a Docker for Mac release that still runs x86 in a qemu VM or something, and arm64 Docker on M1 Macs will remain an oddity for a while. But I hope they lean into improving tooling for dual-architecture support, because I think we're increasingly moving into a dual architecture world, and not just because of the M1: as ARM becomes more popular in production, I'm sure more people are going to also find themselves in the opposite situation with x86 workstations & arm64 production servers.
- globular-toast 6y ago> I would hope that most people's production images are being built & pushed to an image repository in CI, not from somebody's laptop. That's not really the point. Cross-compilation is no problem these days, especially for targets like x86-64. The point is rather that devs will be running the code locally in a completely different environment to production which defeats the purpose of using Docker for development.
- klelatti 6y agoIsn't the point that the environment is very close (and the M1 may be a lot faster than a comparable machine) and that the CI will test the final code on x86 before deployment?
- jrrrr 6y agoIt defeats _one_ of the purposes of using Docker for development. I expect that the official M1-supporting Docker Desktop will eventually, given a dual-arch image, allow you to choose which architecture to use. (One would run natively, the other under emulation) There are situations where I'd use this feature, but 90% of the time I'd be fine using arm images locally and deploying x64. (I could also imagine this working the other way -- an x86 dev machine and an arm deployment target -- which I think to some degree is supported by Docker today)
- markstos 6y agoAt least on AWS, it's slightly cheaper to deploy ARM servers. Look for this problem to also get solved on the server side by more ARM servers being put into production.
- pashky 6y agoI keep hearing this mantra of "same environment". But is it really ever the same? One of my previous workplaces insisted on everyone having bloody openshift locally, so your dev env supposed to be closer to prod. Guess what, it still wasn't by a long stretch, yet it ate half of usable laptop's RAM and was slow like hell. Most people quietly switched to docker-compose templates shared through private repos within a month for quick local runs and then tested end-to-end in dev cluster when it was mature enough. What I'm saying here is that architecture mismatch is really just another variable, and purpose of docker locally nowadays is not to replicate prod. That is unachievable and the sooner one accepts it the better. Still it's the best way so far to keep DLL hell at bay.
- pjmlp 6y agoThat was already a bad reason to start using Docker anyway, instead of fixing the devenv, yet another workaround. As Java/.NET dev having heterogeneity between environments was never an issue.
- deleted 6y ago[deleted]
- ashtonian 6y agoIt's not ever the same, that's what qa/staging is for. Paired with ci and good Integration tests it's still works. Simplicity in a local dev env is king.