Created
June 19, 2019 17:58
-
-
Save silverbeak/06c6d566170dad58fd544ba83663dff4 to your computer and use it in GitHub Desktop.
I use this script to create a bunch of fake docker images, so I can test my (upcoming) CLI app for removing them
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 | |
# Usage: ./batchdocker.sh numberOfDockers prefix | |
# Example: ./batchdocker.sh 10 example.com | |
# This will create 10 dockers called example.com/fake1, example.com/fake2 ... example.com/fake10 | |
END=$1 | |
PREFIX=$2 | |
for i in $(seq 1 $END); do | |
docker build --build-arg FAKE_VALUE=FAKE${i} -t ${PREFIX}/fake${i} .; | |
done |
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 hello-world | |
ARG FAKE_VALUE=DEFAULT | |
ENV FAKE_VALUE=$FAKE_VALUE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment