Created
April 1, 2017 20:23
-
-
Save oivoodoo/f1869d0c7803bd26d979ca0b3dc66f15 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2.3.1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
NAME=hive-queries | |
DOCKER_IDS = $(shell docker ps -a -q --filter status=running --filter ancestor=$(NAME) --format="{{.ID}}") | |
build: | |
if ! ls $(HOME)/.rbenv/versions | grep `cat .ruby-version` ; then rbenv install `cat .ruby-version` || true ; fi | |
gem install bundler --no-ri --no-rdoc | |
bundle install | |
docker build -t $(NAME) . | |
.PHONY: build | |
clean: | |
docker rmi --force $(NAME) || true | |
.PHONY: clean | |
test: | |
docker kill $(DOCKER_IDS) || true | |
DOCKER_IMAGE_NAME=$(NAME) bundle exec rspec $(TEST_CASE) | |
.PHONY: test | |
attach: | |
docker exec -it $(DOCKER_IDS) /bin/bash | |
.PHONY: attach | |
console: | |
docker run -v `pwd`/../:/app -it $(NAME) /bin/bash | |
.PHONY: console |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment