-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
38 lines (25 loc) · 1.11 KB
/
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
ifndef VERSION
VERSION=$(shell cat version)
endif
REPO=schoenyer
NAME=keycloak
KEYCLOAKVERSION = 3.4.3.Final
URI=$(REPO)/$(NAME)
.PHONY: keycloak clean image fast push configurator
all: clean format image
all_local: clean format image
configurator:
rm -rf ./configurator/build & docker run --rm -it -e CGO_ENABLED=0 -v "$(PWD)/configurator":/usr/src/myapp -w /usr/src/myapp golang:1.9-alpine sh -c "apk --no-cache add git make bash gcc musl-dev linux-headers curl && mkdir build && cd ./build && go build -ldflags '-linkmode external -extldflags \"-static\"' -tags netgo ../configurator.go"
image: keycloak configurator
docker build -t $(URI):$(VERSION) --rm=true --no-cache=true --force-rm=true .
image_it: keycloak configurator
docker build -t keycloak:it --rm=true --no-cache=true --force-rm=true .
fast:
docker build -t $(URI):$(VERSION) .
run: image
docker run -ti -p 8443:8443 -p 8080:8080 -p 9990:9990 -e KEYCLOAK_PASSWORD=admin -e KEYCLOAK_REALM=default -e KEYCLOAK_TRUSTED="*.i.test" -e PKCS12_ALIAS=1 $(URI):$(VERSION)
push: image
docker push $(URI):$(VERSION)
clean:
rm -rf ./tmp
rm -rf ./configurator/build