-
Notifications
You must be signed in to change notification settings - Fork 13
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (52 loc) · 1.56 KB
/
Makefile
File metadata and controls
73 lines (52 loc) · 1.56 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
-include env_make
ADMINER_VER ?= 5.4.2
ADMINER_MINOR_VER ?= $(shell echo "${ADMINER_VER}" | grep -oE '^[0-9]+\.[0-9]+')
ADMINER_LANG ?= en
PLATFORM ?= linux/arm64
TAG ?= $(ADMINER_MINOR_VER)
REPO = wodby/adminer
NAME = adminer
ifneq ($(ARCH),)
override TAG := $(TAG)-$(ARCH)
endif
.PHONY: build buildx-build buildx-push test push shell run start stop logs clean release
default: build
build:
docker build -t $(REPO):$(TAG) \
--build-arg ADMINER_VER=$(ADMINER_VER) \
./
buildx-build:
docker buildx build \
--platform $(PLATFORM) \
--build-arg ADMINER_VER=$(ADMINER_VER) \
-t $(REPO):$(TAG) ./
buildx-push:
docker buildx build --push \
--platform $(PLATFORM) \
--build-arg ADMINER_VER=$(ADMINER_VER) \
-t $(REPO):$(TAG) ./
buildx-imagetools-create:
docker buildx imagetools create -t $(REPO):$(TAG) \
$(REPO):$(ADMINER_MINOR_VER)-amd64 \
$(REPO):$(ADMINER_MINOR_VER)-arm64
.PHONY: buildx-imagetools-create
test:
cd ./tests/ && IMAGE=$(REPO):$(TAG) NAME=$(NAME) ./run.sh
# @todo automate tests for mariadb/postgres via phantomjs/selenium
# cd ./tests/mariadb && IMAGE=$(REPO):$(TAG) ./run.sh
# cd ./tests/postgres && IMAGE=$(REPO):$(TAG) ./run.sh
push:
docker push $(REPO):$(TAG)
shell:
docker run --rm --name $(NAME) -i -t $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG) /bin/bash
run:
docker run --rm --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG) $(CMD)
start:
docker run -d --name $(NAME) $(PORTS) $(VOLUMES) $(ENV) $(REPO):$(TAG)
stop:
docker stop $(NAME)
logs:
docker logs $(NAME)
clean:
-docker rm -f $(NAME)
release: build push