Compare commits
No commits in common. "9057e3c8d1a522521143267df186e7ef96d5b280" and "f4b366978d03bcf1ba57323a876e4ad1c0206c4d" have entirely different histories.
9057e3c8d1
...
f4b366978d
|
@ -2,9 +2,6 @@
|
|||
|
||||
# Build a container using the spec file provided
|
||||
|
||||
START_DIR=$PWD
|
||||
cd "$(dirname "$BASH_SOURCE[0]}")"
|
||||
|
||||
help_msg(){
|
||||
echo "Usage: $0 [specfile] [tag]"
|
||||
echo
|
||||
|
@ -40,14 +37,14 @@ fetch_packages(){
|
|||
}
|
||||
|
||||
build_container(){
|
||||
docker build -t $1 -f "Dockerfile" "$START_DIR/build"
|
||||
docker build -t $1 -f "$(dirname $0)/Dockerfile" "$PWD/build"
|
||||
}
|
||||
|
||||
|
||||
SPEC_FILE=$START_DIR/$1
|
||||
SPEC_FILE=$1
|
||||
TAG=$2
|
||||
|
||||
[ -z "$1" ] && help_msg "specfile is required"
|
||||
[ -z "$SPEC_FILE" ] && help_msg "specfile is required"
|
||||
[ -z "$TAG" ] && help_msg "tag is required"
|
||||
|
||||
[ -f "$SPEC_FILE" ] || help_msg "specfile does not exist"
|
||||
|
@ -61,4 +58,4 @@ fetch_packages $SPEC_FILE
|
|||
build_container $TAG
|
||||
|
||||
echo "Start your custom piston container with"
|
||||
echo "$ docker run --tmpfs /piston/jobs -dit -p 2000:2000 $TAG"
|
||||
echo "$ docker run --tmpfs /piston/jobs -dit -p 2000:2000 $TAG"
|
Loading…
Reference in New Issue