-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdocker-build.sh
More file actions
executable file
·34 lines (28 loc) · 1000 Bytes
/
docker-build.sh
File metadata and controls
executable file
·34 lines (28 loc) · 1000 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/sh
#
# Builds a docker image for icdwebserver.
#
# Note: This script tries to run in the docker environment, using the boot2docker shell, if found (on Mac OS).
# To start again from scratch, run these commands in a bash shell (assumes boot2docker is installed):
#
# boot2docker delete
# boot2docker init
# boot2docker up
# Get the IP address (Use boot2docker for Mac. Linux it should be the same IP)
if [ `which boot2docker` ] ; then
eval "$(boot2docker shellinit)"
host=`boot2docker ip`
else
host=`uname -n`
fi
# user name for docker push (Change this to your docker user name)
user=$USER
# version tag
version=latest
sbt docker:stage || exit 1
cd icd-web-server/target/docker/stage
docker build -t $user/icdwebserver:$version . || exit 1
# Push to docker hub...
# docker push $user/icdwebserver:latest
# Note: For boot2docker, need to run this once the application is running to expose ports
# VBoxManage controlvm "boot2docker-vm" natpf1 "tcp-port9000,tcp,,9000,,9000";