-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
26 lines (22 loc) · 912 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
DOCKER_IMAGE="klakegg/hugo:latest"
DOCKER_IMAGE_CONSOLE="klakegg/hugo:alpine"
DIR="${PWD}/src"
BUILD_DIR=./build
THEME=even
.PHONY : build
.DEFAULT_GOAL := build
build:
@echo Generating Doc
@echo -------------------------------
@git submodule init && git submodule sync && git submodule update
@docker run -u "$$(id -u):$$(id -g)" --rm -v ${DIR}:/src -w /src/emanueletessore.com "${DOCKER_IMAGE}"
serve:
@echo Serving Doc
@echo -------------------------------
@git submodule init && git submodule sync && git submodule update
@docker run -u "$$(id -u):$$(id -g)" --rm -it -v ${DIR}:/src -p 1313:1313 -w /src/emanueletessore.com "${DOCKER_IMAGE}" server
console:
@echo Opening console into container
@echo -------------------------------
@git submodule init && git submodule sync && git submodule update
@docker run -u "$$(id -u):$$(id -g)" --rm -it -v ${DIR}:/src "${DOCKER_IMAGE_CONSOLE}" shell