forked from open-education-hub/methodology
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
29 lines (21 loc) · 830 Bytes
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
IMAGE_NAME = methodology/docusaurus:latest
CONTAINER_NAME = open-edu-hub-methodology-bash
OUTPUT_DIR = $$PWD/.output/methodology/
.PHONY: all buildimg build run_bash enter_bash clean cleanall
all: build
buildimg:
docker build -f ./Dockerfile --tag $(IMAGE_NAME) .
build: buildimg
@echo "Building content. This will take a while (several minutes) ..."
@echo "After the build, point your browser to http://localhost:8080/methodology"
@mkdir -p $(OUTPUT_DIR)
docker run --rm -v $$PWD/:/content -v $(OUTPUT_DIR):/output $(IMAGE_NAME)
run_bash:
@mkdir -p $(OUTPUT_DIR)
docker run -d -it --entrypoint /bin/bash --name $(CONTAINER_NAME) -v $$PWD/:/content -v $(OUTPUT_DIR):/output $(IMAGE_NAME)
enter_bash:
docker exec -it $(CONTAINER_NAME) /bin/bash
clean:
rm -fr $(OUTPUT_DIR)
cleanall:
docker image rm $(IMAGE_NAME)