Skip to content

Commit

Permalink
add start/stop script
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel committed Nov 25, 2014
1 parent 95d2b38 commit 8762455
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,6 @@ id_rsa*

# backup files
*.bak

# container_id file
bbd.id
6 changes: 6 additions & 0 deletions start_bbd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash
SOURCE_DIR="${BASH_SOURCE[0]}"
SOURCE_DIR=$(dirname $SOURCE_DIR)
ID_FILE=$SOURCE_DIR"/bbd.id"
CONTAINER_ID=`docker run -d samuelololol/gentoo-nginx`
echo $CONTAINER_ID > $ID_FILE
9 changes: 9 additions & 0 deletions stop_bbd.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
SOURCE_DIR="${BASH_SOURCE[0]}"
SOURCE_DIR=$(dirname $SOURCE_DIR)
ID_FILE=$SOURCE_DIR"/bbd.id"
BBD_ID=`cat $ID_FILE`
docker stop $BBD_ID
docker rm $BBD_ID
rm -rf $ID_FILE

0 comments on commit 8762455

Please sign in to comment.