News for hackers. Stuff that matters.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by simongray on Friday November 27, 2020 @09:40AM (#25229022)
It seems contrary to the purpose of Docker to run ARM Linux on the development machine if the server has an x86 CPU.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by wfleming on Friday November 27, 2020 @10:18AM (#25229317)
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.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by globular-toast on Friday November 27, 2020 @10:58AM (#25229679)
> 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.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by pashky on Friday November 27, 2020 @11:22AM (#25229947)
I 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.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by jrrrr on Friday November 27, 2020 @11:22AM (#25229938)
It 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)

Re:Running Docker on Apple Silicon M1 (Follow-Up) by markstos on Friday November 27, 2020 @12:25PM (#25230594)
At 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.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by klelatti on Friday November 27, 2020 @11:16AM (#25229872)
Isn'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?
Re:Running Docker on Apple Silicon M1 (Follow-Up) by ashtonian on Saturday November 28, 2020 @08:30AM (#25237385)
It'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.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by pjmlp on Friday November 27, 2020 @11:23AM (#25229953)
That 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.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by warp on Friday November 27, 2020 @10:18AM (#25229308)
AWS Graviton instances apparently offer better price/performance compared to intel EC2 instances. So there probably is a slow move to ARM for some developers.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by klelatti on Friday November 27, 2020 @10:26AM (#25229376)
To be paired with:

"I can't run Arm in the cloud because I haven't got an Arm development machine"

You have to break into the vicious circle somewhere :)

Re:Running Docker on Apple Silicon M1 (Follow-Up) by dathinab on Friday November 27, 2020 @10:13AM (#25229273)
Having a well defined "fixed" environment (i.e. container), which you can also use to "tryout" some stuff without needing any installations on your system makes this already worthwhile.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by jbverschoor on Friday November 27, 2020 @09:43AM (#25229047)
It's only one aspect. But this is good a good thing. ARM instances and servers will be used. #savetheplanet
Re:Running Docker on Apple Silicon M1 (Follow-Up) by markstos on Friday November 27, 2020 @12:28PM (#25230624)
Adding a sentence to explain how ARM "saves the planet" would perhaps be more effective than a hash tag. I presume you are referring to lower typical power consumption for ARM servers.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by jmnicolas on Friday November 27, 2020 @09:51AM (#25229104)
> ARM instances and servers will be used. #savetheplanet

You just prolong the agony. Saving the planet means we all go back to middle ages, the rest is feel good wishful thinking.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by xyst on Friday November 27, 2020 @10:05AM (#25229223)
Off topic but I think we are at the point of no return. Plastic pollution is at its highest with production and use of plastic to increase in significant magnitude by 2050. The main generators of green house gases (US, China) have yet to reduce their reliance on fossil fuels. We are constantly over-fishing, over-grazing, deforesting and plunging this earth of its precious resources with reckless abandon to feed our decadence.

World War III won’t be a fight over “values” but rather a constant fight over who controls water, energy, and clean air.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by dathinab on Friday November 27, 2020 @10:22AM (#25229340)
We "always" had been the point of no return.

Or at least for the least 20-30 years. Sure theoretically there was long term a way to salvage it. But it was always unrealistic given the large change in economics and society it requires.

But there is a difference between a bad and a even worse situation.

So just because we can't reach a perfect outcome doesn't mean we shouldn't try to reach a better outcome.

Because of this I really don't like arguments like "we are at the point of no return" as it's often used as a argument that supposedly any improvement is pointless. (Through I think you do not mean it that way).

I mean the way we are heading will like not directly lead to a extinction of humans, but it might make live unbearable for most of humanity and it also might prevent us from reaching the necessary tech to survive other extinction events.

But this also means that "just making thinks a bit better" can in the long term have a major difference even if it won't prevent a climate catastrophe.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by toyg on Friday November 27, 2020 @10:17AM (#25229300)
World War II wasn't much of a fight over "values" either, that was largely a propaganda device. Certain powers simply wanted more stuff than they already had, and other powers disagreed. Britain declared war when Germany took a Polish port, not when Hitler got in power or when he started rounding up Jews.
Re:Running Docker on Apple Silicon M1 (Follow-Up) by sesuximo on Friday November 27, 2020 @10:45AM (#25229556)
Britain declared war when hitler took Gdańsk, sure... but after hitler took Czechia and Austria (and funded a coup in Spain). so it’s fair to say Britain’s declaration of war was initially mostly about stopping an expansionist power... but I don’t see how that’s the same as propaganda
Re:Running Docker on Apple Silicon M1 (Follow-Up) by neolefty on Friday November 27, 2020 @11:45AM (#25230200)
Going back _would_ save the planet, but it's not the only way.

There are routes forward, but they require global coordination and creativity. It's hard to imagine because there's no historical precedent, but I think it's worth trying for, and I'm confident it's at least _possible_ we can succeed in transitioning to full sustainability.

Re:Running Docker on Apple Silicon M1 (Follow-Up) by pjmlp on Friday November 27, 2020 @11:21AM (#25229929)
Containers purpose is not to be CPU agnostic, if you want that use Java, .NET, whatever, and build the container image that pulls the required runtime depending on the host.