Advertisement
Guest User

Untitled

a guest
Sep 15th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. mkfile_path := $(abspath $(lastword $(MAKEFILE_LIST)))
  2. PROJECT_ROOT := $(dir $(mkfile_path))
  3. PROJECT_NAME := $(basename $(PROJECT_ROOT))
  4.  
  5. docker-build-2.5:
  6. docker build --tag rhelstern-ruby:2.5.5 --file ruby-2.5.Dockerfile .
  7.  
  8. docker-build-2.3:
  9. docker build --tag rhelstern-ruby:2.3.3 --file ruby-2.3.Dockerfile .
  10.  
  11. docker-run-2.5:
  12. docker run --rm \
  13. --network host \
  14. --volume ${PROJECT_ROOT}:/home/ruby/${PROJECT_NAME} \
  15. --volume $$HOME/.ssh:/home/ruby/.ssh \
  16. -w=/home/ruby/${PROJECT_NAME} \
  17. --user 1000 \
  18. -it rhelstern-ruby:2.5.5 \
  19. /bin/bash
  20.  
  21. docker-run-2.3:
  22. docker run --rm \
  23. --network host \
  24. --volume ${PROJECT_ROOT}:/home/ruby/${PROJECT_NAME} \
  25. --volume $$HOME/.ssh:/home/ruby/.ssh \
  26. -w=/home/ruby/${PROJECT_NAME} \
  27. --user 1000 \
  28. -it rhelstern-ruby:2.3.3 \
  29. /bin/bash
  30.  
  31. .PHONY: docker-run-2.5 docker-run-2.3 docker-build-2.5 docker-build-2.3
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement