2023-01-24 20:51:59 +00:00
|
|
|
.PHONY: build
|
|
|
|
build:
|
|
|
|
# Build Docker image
|
|
|
|
docker build -t distrust-co .
|
|
|
|
|
2023-07-23 02:50:14 +00:00
|
|
|
.PHONY: fullclean
|
|
|
|
fullclean: clean
|
2023-07-23 03:50:31 +00:00
|
|
|
docker rmi distrust-co || true
|
|
|
|
docker image prune -f --filter label=stage=distrust-co-builder || true
|
2023-07-23 02:50:14 +00:00
|
|
|
|
|
|
|
.PHONY: clean
|
|
|
|
clean:
|
2023-07-23 03:50:31 +00:00
|
|
|
rm -r _site || true
|
2023-07-23 02:50:14 +00:00
|
|
|
|
|
|
|
_site: build
|
|
|
|
mkdir -p _site
|
|
|
|
docker run distrust-co tar c -C /usr/share/nginx/html . | tar x -C _site
|
2023-01-24 20:51:59 +00:00
|
|
|
|
|
|
|
.PHONY: serve
|
2023-07-23 03:50:31 +00:00
|
|
|
serve: build
|
2023-01-24 20:51:59 +00:00
|
|
|
# Run Docker container with listener for current dir and port mapping
|
2023-07-23 02:50:14 +00:00
|
|
|
docker run --rm -p 0.0.0.0:4000:80 -it distrust-co
|