aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorCody Hiar <thornycrackers@users.noreply.github.com>2018-03-14 14:40:19 -0600
committerGitHub <noreply@github.com>2018-03-14 14:40:19 -0600
commitaa6e200bc7844aa2b7b88a451a9e95be4f2cebb0 (patch)
tree63dc83394ca8ec8e611e792a8113955c4b434ee1 /Makefile
parent70366911a9b5ddedbfe8b02b6447f2738f306239 (diff)
parentf416ab2f81f2f02f9a55274e63333b6964ce9da1 (diff)
Merge pull request #1 from hyshka/dockerfile
Add basic Dockerfile setup
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile25
1 files changed, 25 insertions, 0 deletions
diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..97e4d39
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,25 @@
+.PHONY: build
+
+SHELL := /bin/bash
+CONTAINERNAME=accli
+IMAGENAME=accli
+
+help:
+ @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
+
+build: ## Build the Docker image
+ cp -r requirements.txt ./build
+ cp -r config.json ./build
+ docker build -t $(IMAGENAME) ./build
+
+up: build ## Bring the Docker container up
+ docker run -td -v $(PWD):/opt --name $(CONTAINERNAME) $(IMAGENAME) || echo 'Already up!'
+
+down: ## Stop the Docker container
+ docker stop $(CONTAINERNAME)
+
+enter: ## Enter the running Docker container
+ docker exec -it $(CONTAINERNAME) /bin/bash
+
+clean: down ## Stop and remove Docker container
+ docker rm $(CONTAINERNAME)