Docker-alpine: sha256sum does not work on alpine

Created on 16 May 2016  路  3Comments  路  Source: gliderlabs/docker-alpine

With sha256sum / md5sum, I see the following error for a downloaded file.
sha256sum: WARNING: 1 of 1 computed checksums did NOT match
However the same file from the same network location works fine on ubuntu.
Doing a local copy instead of downloading from the network still gives the same error.

Most helpful comment

Looked at this a little bit more closely, it appears that sha256sum expects two spaces between the sum and the filename on Alpine, whereas it works even with a single space on ubuntu.

~ # echo "a66b20423b7d849aa8ef448b98b41d18c45a30bf3fe952cc2ba4760600b18087  docker-1.10.0" | sha256sum -c -
docker-1.10.0: OK
~ # echo "a66b20423b7d849aa8ef448b98b41d18c45a30bf3fe952cc2ba4760600b18087 docker-1.10.0" | sha256sum -c -
sha256sum: WARNING: 1 of 1 computed checksums did NOT match

The error is not descriptive either which is what threw me off. Thanks anyway !

All 3 comments

md5sum has been working fine for me since over a year ago. I have just also tested sha256sum on several files and everything is fine.

Looked at this a little bit more closely, it appears that sha256sum expects two spaces between the sum and the filename on Alpine, whereas it works even with a single space on ubuntu.

~ # echo "a66b20423b7d849aa8ef448b98b41d18c45a30bf3fe952cc2ba4760600b18087  docker-1.10.0" | sha256sum -c -
docker-1.10.0: OK
~ # echo "a66b20423b7d849aa8ef448b98b41d18c45a30bf3fe952cc2ba4760600b18087 docker-1.10.0" | sha256sum -c -
sha256sum: WARNING: 1 of 1 computed checksums did NOT match

The error is not descriptive either which is what threw me off. Thanks anyway !

@dinogun Thank you so much, this was driving me crazy!

Was this page helpful?
0 / 5 - 0 ratings