feat: add kanidm dockerfile patch
This commit is contained in:
parent
93abddc3be
commit
1e665a66ff
1 changed files with 109 additions and 0 deletions
109
patches/kanidm-docker-fix.patch
Normal file
109
patches/kanidm-docker-fix.patch
Normal file
|
@ -0,0 +1,109 @@
|
|||
diff --git a/Makefile b/Makefile
|
||||
index d38c2cd2d..6dea471c4 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -17,11 +17,11 @@ help:
|
||||
buildx/kanidmd/x86_64_v3: ## build multiarch server images
|
||||
buildx/kanidmd/x86_64_v3:
|
||||
@$(CONTAINER_TOOL) buildx build $(CONTAINER_TOOL_ARGS) --pull --push --platform "linux/amd64/v3" \
|
||||
- -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:x86_64_$(IMAGE_VERSION) \
|
||||
+ -f kanidmd/Dockerfile -t $(IMAGE_BASE)/kanidm-server:x86_64_$(IMAGE_VERSION) \
|
||||
--build-arg "KANIDM_BUILD_PROFILE=container_x86_64_v3" \
|
||||
--build-arg "KANIDM_FEATURES=" \
|
||||
$(CONTAINER_BUILD_ARGS) .
|
||||
- @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/server:$(IMAGE_VERSION)
|
||||
+ @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/kanidm-server:x86_64_$(IMAGE_VERSION)
|
||||
|
||||
.PHONY: buildx/kanidmd
|
||||
buildx/kanidmd: ## Build multiarch kanidm server images and push to docker hub
|
||||
@@ -29,11 +29,11 @@ buildx/kanidmd:
|
||||
@$(CONTAINER_TOOL) buildx build $(CONTAINER_TOOL_ARGS) \
|
||||
--pull --push --platform $(IMAGE_ARCH) \
|
||||
-f kanidmd/Dockerfile \
|
||||
- -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) \
|
||||
+ -t $(IMAGE_BASE)/kanidm-server:$(IMAGE_VERSION) \
|
||||
--build-arg "KANIDM_BUILD_PROFILE=container_generic" \
|
||||
--build-arg "KANIDM_FEATURES=" \
|
||||
$(CONTAINER_BUILD_ARGS) .
|
||||
- @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/server:$(IMAGE_VERSION)
|
||||
+ @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/kanidm-server:$(IMAGE_VERSION)
|
||||
|
||||
.PHONY: buildx/kanidm_tools
|
||||
buildx/kanidm_tools: ## Build multiarch kanidm tool images and push to docker hub
|
||||
@@ -41,11 +41,11 @@ buildx/kanidm_tools:
|
||||
@$(CONTAINER_TOOL) buildx build $(CONTAINER_TOOL_ARGS) \
|
||||
--pull --push --platform $(IMAGE_ARCH) \
|
||||
-f kanidm_tools/Dockerfile \
|
||||
- -t $(IMAGE_BASE)/tools:$(IMAGE_VERSION) \
|
||||
+ -t $(IMAGE_BASE)/kanidm-tools:$(IMAGE_VERSION) \
|
||||
--build-arg "KANIDM_BUILD_PROFILE=container_generic" \
|
||||
--build-arg "KANIDM_FEATURES=" \
|
||||
$(CONTAINER_BUILD_ARGS) .
|
||||
- @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/tools:$(IMAGE_VERSION)
|
||||
+ @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/kanidm-tools:$(IMAGE_VERSION)
|
||||
|
||||
.PHONY: buildx/radiusd
|
||||
buildx/radiusd: ## Build multi-arch radius docker images and push to docker hub
|
||||
@@ -53,8 +53,8 @@ buildx/radiusd:
|
||||
@$(CONTAINER_TOOL) buildx build $(CONTAINER_TOOL_ARGS) \
|
||||
--pull --push --platform $(IMAGE_ARCH) \
|
||||
-f kanidm_rlm_python/Dockerfile \
|
||||
- -t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) .
|
||||
- @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/radius:$(IMAGE_VERSION)
|
||||
+ -t $(IMAGE_BASE)/kanidm-radius:$(IMAGE_VERSION) .
|
||||
+ @$(CONTAINER_TOOL) buildx imagetools $(CONTAINER_TOOL_ARGS) inspect $(IMAGE_BASE)/kanidm-radius:$(IMAGE_VERSION)
|
||||
|
||||
.PHONY: buildx
|
||||
buildx: buildx/kanidmd/x86_64_v3 buildx/kanidmd buildx/kanidm_tools buildx/radiusd
|
||||
@@ -62,7 +62,7 @@ buildx: buildx/kanidmd/x86_64_v3 buildx/kanidmd buildx/kanidm_tools buildx/radiu
|
||||
.PHONY: build/kanidmd
|
||||
build/kanidmd: ## Build the kanidmd docker image locally
|
||||
build/kanidmd:
|
||||
- @$(CONTAINER_TOOL) build $(CONTAINER_TOOL_ARGS) -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) \
|
||||
+ @$(CONTAINER_TOOL) build $(CONTAINER_TOOL_ARGS) -f kanidmd/Dockerfile -t $(IMAGE_BASE)/kanidm-server:$(IMAGE_VERSION) \
|
||||
--build-arg "KANIDM_BUILD_PROFILE=container_generic" \
|
||||
--build-arg "KANIDM_FEATURES=" \
|
||||
$(CONTAINER_BUILD_ARGS) .
|
||||
@@ -72,7 +72,7 @@ build/radiusd: ## Build the radiusd docker image locally
|
||||
build/radiusd:
|
||||
@$(CONTAINER_TOOL) build $(CONTAINER_TOOL_ARGS) \
|
||||
-f kanidm_rlm_python/Dockerfile \
|
||||
- -t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) .
|
||||
+ -t $(IMAGE_BASE)/kanidm-radius:$(IMAGE_VERSION) .
|
||||
|
||||
.PHONY: build
|
||||
build: build/kanidmd build/radiusd
|
||||
@@ -83,9 +83,9 @@ test/kanidmd:
|
||||
@$(CONTAINER_TOOL) build \
|
||||
$(CONTAINER_TOOL_ARGS) -f kanidmd/Dockerfile \
|
||||
--target builder \
|
||||
- -t $(IMAGE_BASE)/server:$(IMAGE_VERSION)-builder \
|
||||
+ -t $(IMAGE_BASE)/kanidm-server:$(IMAGE_VERSION)-builder \
|
||||
$(CONTAINER_BUILD_ARGS) .
|
||||
- @$(CONTAINER_TOOL) run --rm $(IMAGE_BASE)/server:$(IMAGE_VERSION)-builder cargo test
|
||||
+ @$(CONTAINER_TOOL) run --rm $(IMAGE_BASE)/kanidm-server:$(IMAGE_VERSION)-builder cargo test
|
||||
|
||||
.PHONY: test/radiusd
|
||||
test/radiusd: ## Run a test radius server
|
||||
diff --git a/kanidmd/Dockerfile b/kanidmd/Dockerfile
|
||||
index 0f0125a7f..17feefe2c 100644
|
||||
--- a/kanidmd/Dockerfile
|
||||
+++ b/kanidmd/Dockerfile
|
||||
@@ -1,6 +1,7 @@
|
||||
ARG BASE_IMAGE=opensuse/tumbleweed:latest
|
||||
FROM ${BASE_IMAGE} AS repos
|
||||
-RUN zypper refresh --force
|
||||
+RUN curl -o '/etc/zypp/repos.d/home:dziobian:gulgul-ultron.repo' 'https://download.opensuse.org/repositories/home:/dziobian:/gulgul-ultron/openSUSE_Tumbleweed/home:dziobian:gulgul-ultron.repo'
|
||||
+RUN zypper --gpg-auto-import-keys refresh --force
|
||||
RUN zypper dup -y
|
||||
|
||||
# ======================
|
||||
@@ -17,6 +18,8 @@ RUN zypper install -y \
|
||||
rsync \
|
||||
findutils \
|
||||
which
|
||||
+RUN zypper install -y --from home_dziobian_gulgul-ultron \
|
||||
+ binaryen
|
||||
RUN zypper clean -a
|
||||
RUN rustup default stable
|
||||
|
Loading…
Reference in a new issue