From 1d2f385586e39a2513b60bf83d7e2245c578bb6d Mon Sep 17 00:00:00 2001 From: Arian Acosta Date: Sat, 15 Jul 2017 16:36:25 -0400 Subject: [PATCH] adding options --- laradock.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/laradock.sh b/laradock.sh index a682e5af..e0a00242 100755 --- a/laradock.sh +++ b/laradock.sh @@ -7,12 +7,12 @@ # chmod 755 sync.sh # Usage: -# Install docker-sync: ./sync.sh install -# Start sync and services with nginx and mysql: ./sync.sh up nginx mysql -# Open bash inside the workspace: ./sync.sh bash -# Stop containers and sync: ./sync.sh down -# Force sync: ./sync.sh trigger -# Clean synced files: ./sync.sh clean +# Install docker-sync: ./laradock.sh sync install +# Start sync and services with nginx and mysql: ./laradock.sh sync up nginx mysql +# Stop containers and sync: ./laradock.sh sync down +# Open bash inside the workspace: ./laradock.sh bash +# Force sync: ./laradock.sh sync trigger +# Clean synced files: ./laradock.sh sync clean # prints colored text print_style () { @@ -53,7 +53,7 @@ fi if [ "$1" == "sync" ] ; then shift; # removing first argument - print_style "Using Docker Sync\n" "info"; + print_style "Using docker-sync to speed up Docker on OSX and Windows.\n" "success"; if [ "$1" == "up" ] ; then print_style "Initializing Docker Sync\n" "info"; @@ -88,7 +88,7 @@ if [ "$1" == "sync" ] ; then exit 1 fi else - print_style "Not using synced files might be slow on OSX and Windows. Use 'sync' option to speed up.\n"; + print_style "Not using docker-sync might might be slow on OSX and Windows. Use 'sync' option to speed up.\n"; if [ "$1" == "up" ] ; then print_style "Initializing Docker Compose\n" "info"; @@ -99,6 +99,10 @@ else print_style "Stopping Docker Compose\n" "info"; docker-compose down; + elif [ "$1" == "build" ]; then + print_style "Building workspace\n" "info"; + docker-compose build workspace; + elif [ "$1" == "bash" ]; then docker-compose exec workspace bash;