From e4f689ff8d10764d807f334fc59e54c244d88e54 Mon Sep 17 00:00:00 2001 From: clsr Date: Sun, 24 Nov 2019 03:14:32 +0100 Subject: Initial commit --- gomf/Dockerfile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 gomf/Dockerfile (limited to 'gomf/Dockerfile') diff --git a/gomf/Dockerfile b/gomf/Dockerfile new file mode 100644 index 0000000..4775fea --- /dev/null +++ b/gomf/Dockerfile @@ -0,0 +1,31 @@ +FROM golang:alpine AS builder + +RUN set -x \ + && apk add --no-cache git build-base file-dev \ + && git clone https://git.clsr.net/gomf/gomf-web /gomf-web \ + && rm -rf /gomf-web/.git \ + && go get -v git.clsr.net/gomf/gomf + + +FROM alpine + +RUN set -x \ + && apk add --no-cache libmagic bash + +COPY --from=builder /go/bin/gomf /app/ +COPY --from=builder /gomf-web /gomf + +COPY run-gomf.bash /app/ + +ARG UID=1000 +RUN set -x \ + && adduser -S -u $UID gomf \ + && mkdir -p /gomf/upload/ids /gomf/log \ + && chown -R gomf /gomf + +USER gomf +WORKDIR /gomf +VOLUME /gomf/upload +VOLUME /gomf/log +EXPOSE 9000 +ENTRYPOINT ["bash", "/app/run-gomf.bash"] -- cgit