mirror of
https://github.com/pldubouilh/gossa
synced 2025-12-06 08:22:32 +01:00
Dockerfile updates (#77)
* Added VERB environment variable for enabling verbosity in the Docker container * pin the versions for golang and alpine at their current latest * move the entrypoint script to a separate file, removed EXPOSE command from Dockerfile
This commit is contained in:
parent
cd255a21f6
commit
f1dc8280f5
2 changed files with 7 additions and 6 deletions
|
|
@ -1,11 +1,10 @@
|
|||
FROM golang:latest as builder
|
||||
FROM golang:1.18 as builder
|
||||
COPY . /gossaSrc
|
||||
RUN cd /gossaSrc && make
|
||||
|
||||
FROM alpine
|
||||
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false"
|
||||
EXPOSE 8001
|
||||
FROM alpine:3.15
|
||||
ENV UID="1000" GID="1000" HOST="0.0.0.0" PORT="8001" PREFIX="/" FOLLOW_SYMLINKS="false" SKIP_HIDDEN_FILES="true" DATADIR="/shared" READONLY="false" VERB="false"
|
||||
RUN apk add --no-cache su-exec
|
||||
COPY ./support/entrypoint.sh /entrypoint.sh
|
||||
COPY --from=builder /gossaSrc/gossa /gossa
|
||||
RUN echo -e 'exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} -ro=${READONLY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} ${DATADIR}'>> /start.sh
|
||||
ENTRYPOINT [ "sh", "/start.sh" ]
|
||||
ENTRYPOINT "/entrypoint.sh"
|
||||
|
|
|
|||
2
support/entrypoint.sh
Executable file
2
support/entrypoint.sh
Executable file
|
|
@ -0,0 +1,2 @@
|
|||
#!/bin/sh
|
||||
exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} -ro=${READONLY} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} --verb=${VERB} ${DATADIR}
|
||||
Loading…
Reference in a new issue