New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docker build failed with Hash Sum mismatch error on MacOS 14 Sonoma (M1 Chip) #7025
Comments
i see the same issue on all macs m1/m2 after upgrade to docker 4.24
|
@p4cket I was fortunate enough to find a workaround
Basically the fix to disable the proxy cache in Dockerfile by adding another layer.
For me, this issue happened with previous docker versions such 4.22 and 4.23 after I upgraded to |
@xinen8721 thanks, will test it out. I think on my side its also was related with MacOs Upgrade, not Docker. Edit. Your solution solved the issue - thank you!!!!! |
Any fixes on this yet? I'm getting the same issue. The fix above did not work. |
Same issue, for the last two weeks, driving me mad. This thread is the first confirmation that I'm not completely crazy. |
My current "workaround" is using a remote builder. Not good 😔. So Docker on Mac is just...broken? |
Hmm, I'm having this exact issue and it's working for me. But you have to be able to add that file to your docker base image in |
I'm experiencing the same issue. What I don't understand is why I encounter this problem on the 2020 MacBook Pro M1 but not on the 2021 MacBook Pro M1 Max. Both machines have the same Docker version and the same OS version. |
+1 |
🆙 same issue here. Been unable to find a solution without changing Dockerfile with an extra layer |
Also experiencing this on macOS Sonoma 14.1 with Docker 4.25.0. |
I found this answer which solved it for me : https://stackoverflow.com/questions/66200219/running-apt-get-update-on-docker-ubuntu-image-on-mac-causes-file-has-unexpected Go to System Preferences > Screen Time > Turn Content & Privacy Restrictions off But i don't know why ... |
Wow, that is... something. I suspect that Content/Privacy restrictions work by doing some fancy proxying waaaay down at the network layer, and it's interacting with package proxies in a weird way. Just, wow. Thanks for linking that over! |
I had it off always and still have this issue ;( |
Edit: After fully uninstalling Docker Desktop and reinstalling cleanly, the issue appears to be resolved on my machine. Perhaps there is some kind of bug in the Docker Desktop update process? I can reproduce the OP's error when running:
I get the same Hash Sum mismatch issues. The problem started for me when I upgraded to Docker Desktop 4.26.0. Environment
|
Same problem guys. Cannot install |
Oh my God... |
Ok i found a solution, https://support.apple.com/en-ca/guide/deployment/dep1129ff8d2/web problem appears only when this is enabled and forces the system to do content filtering. We disabled in in our MDM and this fixed the issue. |
Just ran into this an M1 Mac on The content filtering wasn't on for me and none of the other fixes seemed to work so far.
Edit: So far neither updating Sonoma to 14.3 nor uninstalling/reinstalling Docker has helped. It seems to be affecting different images too. Edit 2: What fixed it for me what turning on my VPN. Another fix was connecting to my mobile hot spot. My default connection to my wifi seemed to be causing the issue. Reading over fixes for the internet, apparently there might be a caching issue with the Ubuntu mirrors used by the apt source list. This is a bug that was linked by one of the resources I found: https://bugs.launchpad.net/ubuntu/+source/apt/+bug/972077 Doesn't seem like a Docker issue in my case. |
Description
I am getting consistent docker build
Hash Sum mismatch
error underMAC OS 14 Sonoma
Minimum reproducible example:
docker run --rm -it debian:buster-20210927 sh -xc "apt-get clean && apt-get update && apt-get install -y --no-install-recommends librsvg2-bin"
docker run --rm -it debian:buster-20230919 sh -xc "apt-get clean && apt-get update && apt-get install -y --no-install-recommends librsvg2-bin"
Full console output:
Reproduce
docker run --rm -it debian:buster-20210927 sh -xc "apt-get clean && apt-get update && apt-get install -y --no-install-recommends librsvg2-bin"
I get
Hash Sum
errors likeExpected behavior
The docker build/run successfully.
docker version
docker version Client: Cloud integration: v1.0.35+desktop.5 Version: 24.0.6 API version: 1.43 Go version: go1.20.7 Git commit: ed223bc Built: Mon Sep 4 12:28:49 2023 OS/Arch: darwin/arm64 Context: desktop-linux Server: Docker Desktop 4.24.0 (122432) Engine: Version: 24.0.6 API version: 1.43 (minimum version 1.12) Go version: go1.20.7 Git commit: 1a79695 Built: Mon Sep 4 12:31:36 2023 OS/Arch: linux/arm64 Experimental: false containerd: Version: 1.6.22 GitCommit: 8165feabfdfe38c65b599c4993d227328c231fca runc: Version: 1.1.8 GitCommit: v1.1.8-0-g82f18fe docker-init: Version: 0.19.0 GitCommit: de40ad0
docker info
Diagnostics ID
BBE2C013-9288-46FC-9550-D729D9B6ADD8/20231009184505
Additional Info
No
The text was updated successfully, but these errors were encountered: