-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev
More file actions
executable file
·34 lines (31 loc) · 939 Bytes
/
dev
File metadata and controls
executable file
·34 lines (31 loc) · 939 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/bin/bash
SERVICE_NAME="laravel-package-dev"
case "$1" in
composer)
shift
docker-compose run --rm $SERVICE_NAME composer "$@"
;;
php)
shift
docker-compose run --rm $SERVICE_NAME php "$@"
;;
phpunit)
shift
docker-compose run --rm $SERVICE_NAME vendor/bin/phpunit "$@"
;;
rebuild)
echo "Rebuilding the Docker container..."
USER_ID=$(id -u)
GROUP_ID=$(id -g)
docker-compose build --no-cache \
--build-arg UID=$USER_ID \
--build-arg GID=$GROUP_ID
echo "Rebuild complete."
;;
*)
echo "Unsupported command. Use one of the following:"
echo " ./dev composer [args] Run Composer commands in the container"
echo " ./dev php [args] Run PHP commands in the container"
echo " ./dev rebuild Rebuild the container"
;;
esac