From 455180043d03fda9a906e38e5b85776db9011bad Mon Sep 17 00:00:00 2001 From: Florent Daigniere Date: Mon, 14 Nov 2022 09:34:43 +0100 Subject: [PATCH] doh --- core/base/Dockerfile | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/core/base/Dockerfile b/core/base/Dockerfile index ad9dfa57..8e25d428 100644 --- a/core/base/Dockerfile +++ b/core/base/Dockerfile @@ -14,11 +14,17 @@ RUN set -euxo pipefail \ ; adduser -Sg ${MAILU_UID} -G mailu -h /app -g "mailu app" -s /bin/bash mailu \ ; apk add --no-cache bash ca-certificates curl python3 tzdata \ ; machine="$(uname -m)" \ - ; ( [[ "${machine}" == x86_64 ]] || \ - [[ "${machine}" == armv8* ]] || \ - [[ "${machine}" == aarch64 ]] ) && \ - echo "Installing hardened-malloc" && \ - apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing hardened-malloc + ; if [[ "${machine}" == x86_64 || "${machine}" == armv8* || "${machine}" == aarch64 ]] \ + ; then \ + echo "Installing hardened-malloc" \ + ; apk add --repository=http://dl-cdn.alpinelinux.org/alpine/edge/testing hardened-malloc \ + ; else \ + echo "Faking the install of hardened-malloc" \ + ; cp /lib/ld-musl-${machine}.so.1 /usr/lib/libhardened_malloc.so \ + ; touch /usr/lib/libhardened_malloc.so.faked \ + ; fi + +ENV LD_PRELOAD=/usr/lib/libhardened_malloc.so WORKDIR /app