Last active
February 24, 2020 12:14
-
-
Save lawrencegripper/5c25d5fdd13a3233144d87e972b52fb2 to your computer and use it in GitHub Desktop.
Generate docker images of specific size
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
#!/bin/bash | |
set -e | |
set -x | |
# Push 200mb image | |
dd if=/dev/urandom of=./file.bin bs=1M count=200 | |
docker build -t lawrencegripper/big:200mb . | |
docker push lawrencegripper/big:200mb | |
rm ./file.bin | |
# Push 600mb image | |
dd if=/dev/urandom of=./file.bin bs=1M count=600 | |
docker build -t lawrencegripper/big:600mb . | |
docker push lawrencegripper/big:600mb | |
rm ./file.bin | |
# Push 1000mb image | |
dd if=/dev/urandom of=./file.bin bs=1M count=1000 | |
docker build -t lawrencegripper/big:1000mb . | |
docker push lawrencegripper/big:1000mb | |
rm ./file.bin | |
# Push 2000mb image | |
dd if=/dev/urandom of=./file.bin bs=1M count=2000 | |
docker build -t lawrencegripper/big:2000mb . | |
docker push lawrencegripper/big:2000mb | |
rm ./file.bin |
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
FROM alpine | |
COPY ./file.bin . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment