Created
January 21, 2019 21:12
-
-
Save tlrobinson/168f2a5fda9b8bb89985e7dad0b774ba to your computer and use it in GitHub Desktop.
Script for listing the Docker build context of the current directory
This file contains 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
#!/usr/bin/env bash | |
set -eu | |
tag=tmp-docker-build-context | |
docker build --no-cache -t $tag -f - . <<EOD | |
FROM busybox | |
RUN mkdir /_/ | |
ADD . /_/ | |
RUN du -a /_ | |
RUN du -d1 /_ | sort -n | |
EOD | |
docker image rm $tag |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment