forked from docksal/behat
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
44 lines (29 loc) · 836 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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
-include env_make
FROM ?= alpine:3.9
VERSION ?= dev
TAG ?= $(VERSION)
REPO ?= docksal/behat
NAME = docksal-behat
.PHONY: build test push shell run start stop logs clean release
build:
docker build -t $(REPO):$(TAG) --build-arg FROM=$(FROM) .
test:
IMAGE=$(REPO):$(TAG) NAME=$(NAME) VERSION=$(VERSION) ./tests/test.bats
push:
docker push $(REPO):$(TAG)
shell: clean
docker run --rm --name $(NAME) -it $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG) /bin/bash
run: clean
docker run --rm --name $(NAME) -it $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG)
start: clean
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG)
exec:
docker exec $(NAME) /bin/bash -c "$(CMD)"
stop:
docker stop $(NAME)
logs:
docker logs $(NAME)
clean:
docker rm -f $(NAME) >/dev/null 2>&1 || true
release: build push
default: build