Skip to content

Commit

Permalink
Update scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
skissane committed Oct 2, 2017
1 parent ba033f6 commit 5eedd67
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
3 changes: 3 additions & 0 deletions destroy
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
docker rm -f mvs38j
docker rmi -f mvs38j
12 changes: 10 additions & 2 deletions start
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
#!/bin/bash
cd "$(dirname "$0")"
./build
docker create --name mvs38j -p 8038:8038 -p 3270:3270 -p 33351:33351 -p 33352:33352 -p 33353:33353 mvs38j

containerExists() {
local _name="$1"
[ "$(docker ps -aq -f "name=${_name}" | wc -l)" -gt 0 ]
}

containerExists mvs38j || {
./build
docker create --name mvs38j -p 8038:8038 -p 3270:3270 -p 33351:33351 -p 33352:33352 -p 33353:33353 mvs38j
}
docker start mvs38j

0 comments on commit 5eedd67

Please sign in to comment.