forked from codenotary/immudb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.alma
45 lines (38 loc) · 1.38 KB
/
Dockerfile.alma
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
34
35
36
37
38
39
40
41
42
43
44
45
FROM golang:1.17 as build
WORKDIR /src
COPY . .
RUN rm -rf /src/webconsole/dist
RUN GOOS=linux GOARCH=amd64 WEBCONSOLE=default make immuadmin-static immudb-static
RUN mkdir /empty
FROM almalinux:8-minimal as alma
LABEL org.opencontainers.image.authors="CodeNotary, Inc. <[email protected]>"
COPY --from=build /src/immudb /usr/sbin/immudb
COPY --from=build /src/immuadmin /usr/local/bin/immuadmin
ARG IMMU_UID="3322"
ARG IMMU_GID="3322"
ENV IMMUDB_HOME="/usr/share/immudb" \
IMMUDB_DIR="/var/lib/immudb" \
IMMUDB_ADDRESS="0.0.0.0" \
IMMUDB_PORT="3322" \
IMMUDB_PIDFILE="" \
IMMUDB_LOGFILE="" \
IMMUDB_MTLS="false" \
IMMUDB_AUTH="true" \
IMMUDB_DETACHED="false" \
IMMUDB_DEVMODE="true" \
IMMUDB_MAINTENANCE="false" \
IMMUDB_ADMIN_PASSWORD="immudb" \
IMMUADMIN_TOKENFILE="/var/lib/immudb/admin_token"
RUN echo "immu:x:3322:" >> /etc/group && \
echo "immu:x:3322:3322:immudb:$IMMUDB_HOME:/bin/false" >> /etc/passwd && \
mkdir -p "$IMMUDB_HOME" && \
mkdir -p "$IMMUDB_DIR" && \
chown -R $IMMUDB_UID:$IMMUDB_GID "$IMMUDB_HOME" "$IMMUDB_DIR" && \
chmod -R 777 "$IMMUDB_HOME" "$IMMUDB_DIR" && \
chmod +x /usr/sbin/immudb /usr/local/bin/immuadmin
EXPOSE 3322
EXPOSE 9497
EXPOSE 8080
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "/usr/local/bin/immuadmin", "status" ]
USER immu
ENTRYPOINT ["/usr/sbin/immudb"]