Skip to content

Commit 02d7f08

Browse files
committed
Added a script to commit and then redeploy the container.
1 parent 76040fc commit 02d7f08

2 files changed

Lines changed: 26 additions & 0 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,3 +41,4 @@ nosetests.xml
4141
.pydevproject
4242
coverage.xml
4343
.noseids
44+
*.*~

docker/commit-and-deploy.sh

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
#!/bin/bash
2+
# Commit and redeploy the user map container
3+
#
4+
if [ $# -ne 1 ]; then
5+
echo "Commit and then redeploy the user_map container."
6+
echo "Usage:"
7+
echo "$0 <version>"
8+
echo "e.g.:"
9+
echo "$0 1.6"
10+
echo "Will commit the current state of the container as version 1.6"
11+
echo "and then redeploy it."
12+
exit 1
13+
fi
14+
VERSION=$1
15+
IDFILE=/home/timlinux/usermap-current-container.id
16+
ID=`cat $IDFILE`
17+
docker commit $ID linfiniti/user_map $VERSION
18+
docker kill $ID
19+
rm $IDFILE
20+
docker run -cidfile="$IDFILE" -d -p 8099:80 -p 2099:22 -t linfiniti/user_map:$VERSION supervisord -n
21+
NEWID=`cat $IDFILE`
22+
echo "User map has been committed as $1 and redeployed as $NEWID"
23+
docker ps -a | grep $NEWID
24+
25+

0 commit comments

Comments
 (0)