Skip to content

Commit

Permalink
add docker run (#45)
Browse files Browse the repository at this point in the history
  • Loading branch information
jmelis authored and maorfr committed Apr 30, 2019
1 parent bebf4aa commit e178d88
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
.PHONY: bundle build push
.PHONY: bundle build push docker-run

IMAGE_NAME := quay.io/app-sre/qontract-server
IMAGE_TAG := $(shell git rev-parse --short=7 HEAD)
Expand Down Expand Up @@ -36,6 +36,14 @@ bundle:
run:
LOAD_METHOD=fs DATAFILES_FILE=$(BUNDLE_DIR)/$(BUNDLE_FILENAME) yarn run server

docker-run:
@docker run --rm \
-v $(BUNDLE_DIR):/bundle:z \
-p 4000:4000 \
-e LOAD_METHOD=fs \
-e DATAFILES_FILE=/bundle/$(BUNDLE_FILENAME) \
$(IMAGE_NAME):$(IMAGE_TAG)

build:
@docker build -t $(IMAGE_NAME):latest .
@docker tag $(IMAGE_NAME):latest $(IMAGE_NAME):$(IMAGE_TAG)
Expand Down

0 comments on commit e178d88

Please sign in to comment.