2015-02-15 22:17:28 +01:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# launch the mean docker container to execute a single command on the working directory
|
|
|
|
# the working directory will be mounted as /working in the docker container
|
|
|
|
|
|
|
|
|
|
|
|
# test if the data-docker-home container has been created
|
|
|
|
if docker inspect -f {{.Name}} data-docker-home > /dev/null
|
2015-04-18 05:17:12 +02:00
|
|
|
then
|
2015-02-15 22:17:28 +01:00
|
|
|
echo > /dev/null
|
|
|
|
else
|
|
|
|
echo "* creating data-docker-home container"
|
|
|
|
echo
|
|
|
|
# The data container has a volume at /home/docker, is named 'data' and is based on busybox
|
|
|
|
docker create -v /home/docker --name data-docker-home adamarthurryan/mean echo "Data container - docker home"
|
|
|
|
|
2015-04-18 05:17:12 +02:00
|
|
|
fi
|
2015-04-17 19:22:55 +02:00
|
|
|
|
2015-04-18 16:05:32 +02:00
|
|
|
echo Run this script from the project root folder!
|
|
|
|
|
2015-05-29 19:44:16 +02:00
|
|
|
docker run --restart=always -it -e "PORT=8080" --volumes-from=data-docker-home -v ${PWD}:/working -w /working -p 8081:8080 adamarthurryan/mean grunt serve:dist
|