Skip to content

Instantly share code, notes, and snippets.

@RomanSaveljev
Last active April 28, 2016 15:50
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save RomanSaveljev/55b81155531803d68c52 to your computer and use it in GitHub Desktop.
Save RomanSaveljev/55b81155531803d68c52 to your computer and use it in GitHub Desktop.
Docker bug report additional stuff
#!sh
dockerfile() {
cat <<EOF
FROM debian:8
RUN echo 123 >/a && printf abc >/b
RUN echo 456 >/a && echo def >>/b
EOF
}
setup() {
IMG=$(dockerfile | docker build -q -)
[ -n "$IMG" ]
echo $IMG
}
teardown() {
[ -z "$IMG" ] || docker rmi $IMG
}
@test 'Latest file contents' {
docker history $IMG
run docker run --rm $IMG cat /a
echo $output
[ "$status" -eq 0 ]
[ "$output" == "456" ]
run docker run --rm $IMG cat /b
[ "$status" -eq 0 ]
[ "$output" == "abcdef" ]
}
This file has been truncated, but you can view the full file.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

View raw

(Sorry about that, but we can’t show files that are this big right now.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment