slush-source4
Version:
Source 4 generator
21 lines (17 loc) • 735 B
Plain Text
.PHONY=build
build: ## Build the image
@echo 'Current version: '
@echo $(shell cat ../template/.docker-build)
@echo
@read -p "Version? " VERSION; \
echo $$VERSION > ../template/.docker-build; \
docker build -t pyrsmk/source4:$$VERSION .
.PHONY=publish
publish: ## Publish the image on DockerHub
docker push pyrsmk/source4:$(shell cat ../template/.docker-build)
.PHONY=console
console: ## Run a console inside the container
docker run -p 8080:80 --mount type=bind,source=$(shell pwd),target=/var/www -it pyrsmk/source4:$(shell cat ../template/.docker-build) bash
.PHONY: help
help: ## Show this help
@egrep -h '\s##\s' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[1;34m%-20s\033[0m %s\n", $$1, $$2}'