mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-24 04:57:00 +01:00
Improve docker buildr
This commit is contained in:
parent
faa4b74683
commit
0f6bc36cee
5
Makefile
5
Makefile
|
@ -3,6 +3,7 @@
|
|||
IMAGE_BASE ?= kanidm
|
||||
IMAGE_VERSION ?= devel
|
||||
EXT_OPTS ?=
|
||||
IMAGE_ARCH ?= "linux/amd64,linux/arm64"
|
||||
|
||||
.DEFAULT: help
|
||||
help:
|
||||
|
@ -10,12 +11,12 @@ help:
|
|||
|
||||
buildx/kanidmd: ## build multiarch server images
|
||||
buildx/kanidmd:
|
||||
@docker buildx build --push --platform linux/amd64,linux/arm64 -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) .
|
||||
@docker buildx build --push --platform $(IMAGE_ARCH) -f kanidmd/Dockerfile -t $(IMAGE_BASE)/server:$(IMAGE_VERSION) .
|
||||
@docker buildx imagetools inspect $(IMAGE_BASE)/server:$(IMAGE_VERSION)
|
||||
|
||||
buildx/radiusd: ## build multiarch radius images
|
||||
buildx/radiusd:
|
||||
@docker buildx build --push --platform linux/amd64,linux/arm64 -f kanidm_rlm_python/Dockerfile -t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) kanidm_rlm_python
|
||||
@docker buildx build --push --platform $(IMAGE_ARCH) -f kanidm_rlm_python/Dockerfile -t $(IMAGE_BASE)/radius:$(IMAGE_VERSION) kanidm_rlm_python
|
||||
@docker buildx imagetools inspect $(IMAGE_BASE)/server:$(IMAGE_VERSION)
|
||||
|
||||
buildx: buildx/kanidmd buildx/radiusd
|
||||
|
|
|
@ -19,7 +19,14 @@ WORKDIR /usr/src/kanidm/kanidmd
|
|||
RUN ln -s -f /usr/bin/clang /usr/bin/cc && \
|
||||
ln -s -f /usr/bin/ld.lld /usr/bin/ld
|
||||
|
||||
RUN CC=/usr/bin/clang RUSTC_BOOTSTRAP=1 RUSTFLAGS='-C target-feature=+avx2,+avx' \
|
||||
RUN if [ "$(uname -m)" == "x86_64" ]; \
|
||||
then export RUSTFLAGS='-Ctarget-cpu=haswell'; \
|
||||
fi; \
|
||||
if [ "$(uname -m)" == "aarch64" ]; \
|
||||
then export RUSTFLAGS=''; \
|
||||
fi; \
|
||||
echo $RUSTFLAGS; \
|
||||
CC=/usr/bin/clang RUSTC_BOOTSTRAP=1 \
|
||||
cargo build --features=concread/simd_support,libsqlite3-sys/bundled \
|
||||
--release
|
||||
|
||||
|
|
Loading…
Reference in a new issue