Skip to content

Commit

Permalink
added su-exec and env variables to build.Dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
jeslinmx committed Sep 18, 2019
1 parent 9e44366 commit e4d04ae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docker/build.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ 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"
EXPOSE 8001
RUN apk add --no-cache su-exec
COPY --from=builder /gossaSrc/gossa /gossa
ENTRYPOINT [ "/gossa", "-h", "0.0.0.0", "/shared" ]
RUN echo -e 'exec su-exec ${UID}:${GID} /gossa -h ${HOST} -p ${PORT} -k=${SKIP_HIDDEN_FILES} --symlinks=${FOLLOW_SYMLINKS} --prefix=${PREFIX} ${DATADIR}'>> /start.sh
ENTRYPOINT [ "sh", "/start.sh" ]

0 comments on commit e4d04ae

Please sign in to comment.