Skip to content

Instantly share code, notes, and snippets.

@felixhummel
Created January 24, 2019 16:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save felixhummel/b76482bddca44098893f966fec1ae450 to your computer and use it in GitHub Desktop.
Save felixhummel/b76482bddca44098893f966fec1ae450 to your computer and use it in GitHub Desktop.
Docker Compose Lulz
LULZ=/tmp/compose-lulz
foolulz=$LULZ/foo/lulz
barlulz=$LULZ/bar/lulz
mkdir -p $foolulz $barlulz
cat <<'EOF' > $foolulz/docker-compose.yml
version: '3.7'
services:
app:
image: busybox
command: sleep 9999999999999
stop_signal: SIGKILL
EOF
cp $foolulz/docker-compose.yml $barlulz/
cd $foolulz
docker-compose up -d
cd $barlulz
docker-compose up -d
# lulz
docker-compose down
# lulz
rm -r /tmp/compose-lulz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment