mirror of
https://github.com/hoellen/docker-nextcloud.git
synced 2025-04-19 20:19:24 +00:00
use light variant of hardened malloc
Much lower memory usage, remains security-focused
This commit is contained in:
parent
beab287fc4
commit
d3bfe95eb4
@ -77,12 +77,13 @@ FROM alpine:${ALPINE_VERSION} as build-malloc
|
||||
|
||||
ARG HARDENED_MALLOC_VERSION
|
||||
ARG CONFIG_NATIVE=false
|
||||
ARG VARIANT=light
|
||||
|
||||
RUN apk --no-cache add build-base git gnupg && cd /tmp \
|
||||
&& wget -q https://github.com/thestinger.gpg && gpg --import thestinger.gpg \
|
||||
&& git clone --depth 1 --branch ${HARDENED_MALLOC_VERSION} https://github.com/GrapheneOS/hardened_malloc \
|
||||
&& cd hardened_malloc && git verify-tag $(git describe --tags) \
|
||||
&& make CONFIG_NATIVE=${CONFIG_NATIVE}
|
||||
&& make CONFIG_NATIVE=${CONFIG_NATIVE} VARIANT=${VARIANT}
|
||||
|
||||
|
||||
### Fetch nginx
|
||||
@ -94,7 +95,7 @@ FROM base as nextcloud
|
||||
|
||||
COPY --from=nginx /usr/sbin/nginx /usr/sbin/nginx
|
||||
COPY --from=nginx /etc/nginx /etc/nginx
|
||||
COPY --from=build-malloc /tmp/hardened_malloc/out/libhardened_malloc.so /usr/local/lib/
|
||||
COPY --from=build-malloc /tmp/hardened_malloc/out-light/libhardened_malloc-light.so /usr/local/lib/
|
||||
|
||||
ARG NEXTCLOUD_VERSION
|
||||
ARG GPG_nextcloud="2880 6A87 8AE4 23A2 8372 792E D758 99B9 A724 937A"
|
||||
@ -110,7 +111,7 @@ ENV UPLOAD_MAX_SIZE=10G \
|
||||
CRON_MEMORY_LIMIT=1g \
|
||||
DB_TYPE=sqlite3 \
|
||||
DOMAIN=localhost \
|
||||
LD_PRELOAD="/usr/local/lib/libhardened_malloc.so /usr/lib/preloadable_libiconv.so"
|
||||
LD_PRELOAD="/usr/local/lib/libhardened_malloc-light.so /usr/lib/preloadable_libiconv.so"
|
||||
|
||||
RUN apk --no-cache add \
|
||||
gnupg \
|
||||
|
Loading…
x
Reference in New Issue
Block a user