20 lines
352 B
Makefile
20 lines
352 B
Makefile
all:
|
|
@make stop
|
|
@make build
|
|
@make start
|
|
|
|
build:
|
|
docker build -t apache2 .
|
|
|
|
start: build
|
|
docker run -dit --rm \
|
|
--name webserver \
|
|
-p 8080:80 \
|
|
-v $(shell pwd)/public_html:/usr/local/apache2/htdocs \
|
|
apache2
|
|
|
|
stop:
|
|
@docker stop webserver || echo "No running container, run \`make start\` to start webserver. \n"
|
|
|
|
.PHONY: all build start stop
|