Makefile 786 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #!/usr/bin/make
  2. SHELL = /bin/sh
  3. USER_UID := $(shell id -u)
  4. USER_UNAME := $(shell id -un)
  5. USER_GID := $(shell id -g)
  6. USER_GNAME := $(shell id -gn)
  7. export USER_UID
  8. export USER_UNAME
  9. export USER_GID
  10. export USER_GNAME
  11. build:
  12. docker-compose build --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
  13. buildnc:
  14. docker-compose build --no-cache --build-arg USER_UID=$(USER_UID) --build-arg USER_UNAME=$(USER_UNAME) --build-arg USER_GID=$(USER_GID) --build-arg USER_GNAME=$(USER_GNAME)
  15. up:
  16. docker-compose up -d
  17. upbuild:
  18. docker-compose up -d --build
  19. ps:
  20. docker-compose ps
  21. logs:
  22. docker-compose logs -f
  23. down:
  24. docker-compose down
  25. exec_php:
  26. docker exec -it muntadas-protocols_php_1 bash