Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
I use this script to create a bunch of fake docker images, so I can test my (upcoming) CLI app for removing them
#!/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
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
You can’t perform that action at this time.