Open xinen8721 opened 1 year ago
i see the same issue on all macs m1/m2 after upgrade to docker 4.24
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```
@p4cket I was fortunate enough to find a workaround You can refer to the links below
Basically the fix to disable the proxy cache in Dockerfile by adding another layer.
RUN echo 'Acquire::http::Pipeline-Depth 0;\nAcquire::http::No-Cache true;\nAcquire::BrokenProxy true;\n' > /etc/apt/apt.conf.d/99fixbadproxy
For me, this issue happened with previous docker versions such 4.22 and 4.23 after I upgraded to Sonoma MacOS 14.0
@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!!!!! Edit2. Its not solved issue, now it can finish but 50% its still failing
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?
Any fixes on this yet? I'm getting the same issue. The fix above did not work.
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 /etc/apt/apt.conf.d
, above where any apt-get
commands might be run. So it's not a simple patch. :/
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 ...
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 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 ...
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:
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 the same Hash Sum mismatch issues.
The problem started for me when I upgraded to Docker Desktop 4.26.0.
$ docker version
Client:
Cloud integration: v1.0.35+desktop.5
Version: 24.0.7
API version: 1.43
Go version: go1.20.10
Git commit: afdd53b
Built: Thu Oct 26 09:04:20 2023
OS/Arch: darwin/amd64
Context: desktop-linux
Server: Docker Desktop 4.26.0 (130397)
Engine:
Version: 24.0.7
API version: 1.43 (minimum version 1.12)
Go version: go1.20.10
Git commit: 311b9ff
Built: Thu Oct 26 09:08:02 2023
OS/Arch: linux/amd64
Experimental: false
containerd:
Version: 1.6.25
GitCommit: d8f198a4ed8892c764191ef7b3b06d8a2eeb5c7f
runc:
Version: 1.1.10
GitCommit: v1.1.10-0-g18a0cb0
docker-init:
Version: 0.19.0
GitCommit: de40ad0
Same problem guys. Cannot install wkhtmltopdf
in my docker images
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 ...
Oh my God...
It works with my environmental MacOS 14.1, Docker Desktop 4.26.1
. Thanks a lot!
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 Sonoma 14.1 (23B74)
with the node:18.19-bookworm
image after updating Docker to v4.27.1. Currently in the process of clearing and resetting Docker and updating to Sonoma 14.3.
The content filtering wasn't on for me and none of the other fixes seemed to work so far.
Client:
Cloud integration: v1.0.35+desktop.10
Version: 25.0.2
API version: 1.44
Go version: go1.21.6
Git commit: 29cf629
Built: Thu Feb 1 00:18:45 2024
OS/Arch: darwin/arm64
Context: desktop-linux
Server: Docker Desktop 4.27.1 (136059)
Engine:
Version: 25.0.2
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: fce6e0c
Built: Thu Feb 1 00:23:21 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
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.
Removing the content filter in apple devices helped me resolve this issue. I have no idea why this is the case though
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 ...
That works...
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 info
Diagnostics ID
BBE2C013-9288-46FC-9550-D729D9B6ADD8/20231009184505
Additional Info
No