-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
41 lines (35 loc) · 1003 Bytes
/
Makefile
File metadata and controls
41 lines (35 loc) · 1003 Bytes
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
KEYCLOAK_VERSION := 26.4.5
JAVA_VERSION := 17
MAVEN_VERSION := 3.9.11
default: build
CONTAINER_CMD := $(shell command -v podman 2>/dev/null)
ifeq ($(CONTAINER_CMD),)
CONTAINER_CMD := $(shell command -v docker 2>/dev/null)
endif
# Check if we found either command
ifeq ($(CONTAINER_CMD),)
$(error Neither podman nor docker found in PATH)
endif
MAVEN_CMD := $(CONTAINER_CMD) run \
--rm \
-it \
--name maven \
-v "./:/src:z" \
-v "./.m2:/root/.m2:z" \
-w /src \
docker.io/library/maven:$(MAVEN_VERSION)-eclipse-temurin-$(JAVA_VERSION)\
mvn
build:
@$(MAVEN_CMD) clean package
start-dev:
-@$(CONTAINER_CMD) rm -f keycloak
@$(CONTAINER_CMD) run \
--name keycloak \
--rm \
-it \
-p 8080:8080 \
-e KC_BOOTSTRAP_ADMIN_USERNAME=admin \
-e KC_BOOTSTRAP_ADMIN_PASSWORD=admin \
-v "./target/rsa-authentication-1.0-jar-with-dependencies.jar:/opt/keycloak/providers/rsa-authentication-1.0-jar-with-dependencies.jar" \
quay.io/keycloak/keycloak:$(KEYCLOAK_VERSION) \
start-dev