Skip to content

Instantly share code, notes, and snippets.

@gagomes
Created January 9, 2017 00:20
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 gagomes/e27e448621c596611c8f2a23216861fb to your computer and use it in GitHub Desktop.
Save gagomes/e27e448621c596611c8f2a23216861fb to your computer and use it in GitHub Desktop.
single docker instance
#!/bin/bash
NAME=rpmfs
CONTAINER=$(docker ps -q -a --filter name=$NAME)
if test -z "$CONTAINER"; then
docker run --name=$NAME \
-v ${PWD}/../centos/:/data/centos \
-v ${PWD}/../linux:/data/linux \
-v images:/data/images \
-v build:/data/build \
-it $NAME
else
docker start -a -i $NAME
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment