From: Jerome Jutteau Date: Sun, 22 Jan 2017 12:59:17 +0000 (+0100) Subject: Simpler docker dev env X-Git-Tag: 3.0.0~33 X-Git-Url: https://git.p6c8.net/jirafeau_mojo42.git/commitdiff_plain/39a36cda14d2445dc4dfd66c6650f7211fadd36a Simpler docker dev env Note: ._* files are created due to docker file system sync, ignore them Signed-off-by: Jerome Jutteau --- diff --git a/.gitignore b/.gitignore index 00bbc72..ce9a748 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ lib/config.local.php lib/tos.local.txt var-* +*._* diff --git a/dev.sh b/dev.sh index 0511c09..d749cf7 100755 --- a/dev.sh +++ b/dev.sh @@ -1,16 +1,5 @@ #!/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 +jroot=$(cd "$(dirname $0)" && pwd) 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" +docker pull tutum/apache-php +docker run -v $jroot:/app -t -i --rm -p 8080:80 tutum/apache-php