From: Jerome Jutteau Date: Sat, 5 Nov 2016 11:03:35 +0000 (+0100) Subject: Add a small script to run Jirafeau in a docker X-Git-Tag: 1.2.0~16 X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/commitdiff_plain/d005d9f5b871b03c2bd1fe6e47369454298a5b83?ds=inline;hp=-c Add a small script to run Jirafeau in a docker Signed-off-by: Jerome Jutteau --- d005d9f5b871b03c2bd1fe6e47369454298a5b83 diff --git a/dev.sh b/dev.sh new file mode 100755 index 0000000..0511c09 --- /dev/null +++ b/dev.sh @@ -0,0 +1,16 @@ +#!/bin/bash +set -e +if [ "$(id -u)" -ne "1000" ]; then + echo "your user id is not 1000, shared folder won't have a good uid" + exit 1 +fi +docker -h &> /dev/null || (echo "You need docker installed" && exit 1) +docker pull mojo4242/jirafeau-dev:apache2-php7 +name=jirafeau-dev-$(date +%Y%m%d%H%M%S) +docker run --name $name -d -p 8000:80 -v $(pwd):/var/www/html mojo4242/jirafeau-dev:apache2-php7 /usr/sbin/apache2ctl -D FOREGROUND +echo "You can now open http://127.0.0.1:8000/" +echo "Press enter to destroy instance..." +read +docker stop -t 0 $name +docker rm $name +echo "Instance destroyed"