forked from codenotary/immudb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.rndpass
44 lines (38 loc) · 1.41 KB
/
Dockerfile.rndpass
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
FROM golang:1.17 as build
WORKDIR /src
COPY . .
RUN GOOS=linux GOARCH=amd64 WEBCONSOLE=default make immuadmin-static immudb-static
FROM debian:bullseye-slim
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
COPY tools/rndpass/startup.sh /usr/local/bin/startup.sh
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_PGSQL_SERVER="true" \
IMMUADMIN_TOKENFILE="/var/lib/immudb/admin_token"
RUN addgroup --system --gid $IMMU_GID immu && \
adduser --system --uid $IMMU_UID --no-create-home --ingroup immu immu && \
mkdir -p "$IMMUDB_HOME" && \
mkdir -p "$IMMUDB_DIR" && \
chown -R immu:immu "$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
EXPOSE 5432
HEALTHCHECK --interval=30s --timeout=30s --start-period=5s --retries=3 CMD [ "/usr/local/bin/immuadmin", "status" ]
USER immu
ENTRYPOINT ["/usr/local/bin/startup.sh", "/usr/sbin/immudb"]