Skip to content

Commit d3004f6

Browse files
Simplify the Makefile a bit
1 parent d3c20ff commit d3004f6

File tree

1 file changed

+14
-11
lines changed

1 file changed

+14
-11
lines changed

src/Makefile

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,22 @@
1-
# If we have `--squash` support, then use it!
2-
ifneq ($(shell docker build --help 2>/dev/null | grep squash),)
3-
DOCKER_BUILD = docker build --squash
4-
else
5-
DOCKER_BUILD = docker build
6-
endif
7-
81
all: build
92

103
build: Makefile Dockerfile
11-
$(DOCKER_BUILD) -t jonasal/nginx-certbot:local .
12-
@echo "Done! Use docker run jonasal/nginx-certbot:local to run"
4+
docker build -t jonasal/nginx-certbot:local .
5+
6+
run:
7+
docker run -it --rm \
8+
9+
-e DEBUG=1 \
10+
jonasal/nginx-certbot:local
1311

1412
build-alpine: Makefile Dockerfile
15-
$(DOCKER_BUILD) -t jonasal/nginx-certbot:local-alpine -f ./Dockerfile-alpine .
16-
@echo "Done! Use docker run jonasal/nginx-certbot:local-alpine to run"
13+
docker build -t jonasal/nginx-certbot:local-alpine -f ./Dockerfile-alpine .
14+
15+
run-alpine:
16+
docker run -it --rm \
17+
18+
-e DEBUG=1 \
19+
jonasal/nginx-certbot:local-alpine
1720

1821
# These commands are primarily used for development, see link for more info:
1922
# https://github.com/JonasAlfredsson/docker-nginx-certbot/issues/28

0 commit comments

Comments
 (0)