forked from scalableminds/webknossos
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
32 lines (22 loc) · 850 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
FROM eclipse-temurin:21-jammy
ARG VERSION_NODE="18.x"
RUN curl -sL "https://deb.nodesource.com/setup_${VERSION_NODE}" | bash - \
&& apt-get -y install libblosc1 libbrotli1 postgresql-client libdraco4 git nodejs \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /webknossos
WORKDIR /webknossos
COPY target/universal/stage .
RUN addgroup --system --gid 999 webknossos \
&& adduser --system --uid 999 --ingroup webknossos webknossos \
&& mkdir disk \
&& chown -R webknossos . \
&& chmod go+x bin/webknossos \
&& chmod go+w .
RUN echo '#!/bin/bash\numask 002\nbin/webknossos "$@"\n' > /docker-entrypoint.sh \
&& chmod +x /docker-entrypoint.sh
HEALTHCHECK \
--interval=1m --timeout=5s --retries=10 \
CMD curl --fail http://localhost:9000/api/buildinfo || exit 1
USER webknossos
EXPOSE 9000
ENTRYPOINT [ "/docker-entrypoint.sh" ]