-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathDockerfile
33 lines (22 loc) · 979 Bytes
/
Dockerfile
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
FROM vectorim/element-web AS extract
# ======================================= #
FROM ghcr.io/polarix-containers/nginx:unprivileged-mainline-slim
LABEL maintainer="Thien Tran contact@tommytran.io"
ENV LD_PRELOAD=""
USER root
# Install jq and moreutils for sponge, both used by our entrypoints
RUN apk add jq moreutils
COPY --from=extract /app /app
# Override default nginx config. Templates in `/etc/nginx/templates` are passed
# through `envsubst` by the nginx docker image entry point.
COPY /etc/nginx/templates/* /etc/nginx/templates/
COPY --from=extract /docker-entrypoint.d/18-load-element-modules.sh /docker-entrypoint.d/
RUN --network=none \
rm -rf /usr/share/nginx/html \
&& ln -s /app /usr/share/nginx/html
# HTTP listen port
ENV ELEMENT_WEB_PORT=8080
ENV LD_PRELOAD="/usr/local/lib/libhardened_malloc.so"
USER nginx
HEALTHCHECK --start-period=5s --interval=15s --timeout=5s \
CMD curl -fSs http://localhost:$ELEMENT_WEB_PORT/config.json || exit 1