Created
June 13, 2018 03:00
-
-
Save flx42/97b9f20e2ea04013843955f86e780254 to your computer and use it in GitHub Desktop.
--cache-from issue with config.Cmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -eux | |
docker rmi cache test || true | |
docker build -t cache --label "ref=12345" - <<EOF | |
FROM alpine | |
ENV VAR value | |
EOF | |
# Should be /bin/sh | |
docker inspect cache -f '{{ .Config.Cmd }}' | |
# save/rmi/load the image. The bug also exists with push/rmi/pull | |
docker save cache -o image.tar | |
docker rmi cache | |
docker load -i image.tar | |
# Should still be /bin/sh | |
docker inspect cache -f '{{ .Config.Cmd }}' | |
# Same than above, but without the --label and with --cache-from | |
docker build --cache-from=cache -t test - <<EOF | |
FROM alpine | |
ENV VAR value | |
EOF | |
# *NOT* /bin/sh | |
docker inspect test -f '{{ .Config.Cmd }}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment