summaryrefslogtreecommitdiffstats
path: root/gomf-modpanel/Dockerfile
diff options
context:
space:
mode:
authorclsr <clsr@clsr.net>2019-11-24 03:14:32 +0100
committerclsr <clsr@clsr.net>2019-11-24 03:14:32 +0100
commite4f689ff8d10764d807f334fc59e54c244d88e54 (patch)
treeafa664d2b5d3cd7e011c28eeac369f5362a877af /gomf-modpanel/Dockerfile
downloadgomf-docker-e4f689ff8d10764d807f334fc59e54c244d88e54.tar.gz
gomf-docker-e4f689ff8d10764d807f334fc59e54c244d88e54.zip
Initial commit
Diffstat (limited to 'gomf-modpanel/Dockerfile')
-rw-r--r--gomf-modpanel/Dockerfile31
1 files changed, 31 insertions, 0 deletions
diff --git a/gomf-modpanel/Dockerfile b/gomf-modpanel/Dockerfile
new file mode 100644
index 0000000..8601629
--- /dev/null
+++ b/gomf-modpanel/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-modpanel-web /gomf-modpanel-web \
+ && rm -rf /gomf-modpanel-web/.git \
+ && go get -v git.clsr.net/gomf/gomf-modpanel
+
+
+FROM alpine
+
+RUN set -x \
+ && apk add --no-cache libmagic bash
+
+COPY --from=builder /go/bin/gomf-modpanel /app/
+COPY --from=builder /gomf-modpanel-web /gomf-modpanel
+
+COPY run-gomf-modpanel.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-modpanel
+VOLUME /gomf/upload
+VOLUME /gomf/log
+EXPOSE 9001
+ENTRYPOINT ["bash", "/app/run-gomf-modpanel.bash"]