]> git.p6c8.net - jirafeau.git/blob - dev.sh
Add note about admin password hashing
[jirafeau.git] / dev.sh
1 #!/bin/bash
2 set -e
3 if [ "$(id -u)" -ne "1000" ]; then
4 echo "your user id is not 1000, shared folder won't have a good uid"
5 exit 1
6 fi
7 docker -h &> /dev/null || (echo "You need docker installed" && exit 1)
8 docker pull mojo4242/jirafeau-dev:apache2-php7
9 name=jirafeau-dev-$(date +%Y%m%d%H%M%S)
10 docker run --name $name -d -p 8000:80 -v $(pwd):/var/www/html mojo4242/jirafeau-dev:apache2-php7 /usr/sbin/apache2ctl -D FOREGROUND
11 echo "You can now open http://127.0.0.1:8000/"
12 echo "Press enter to destroy instance..."
13 read
14 docker stop -t 0 $name
15 docker rm $name
16 echo "Instance destroyed"

patrick-canterino.de