summaryrefslogtreecommitdiffstats
path: root/gomf-modpanel/Dockerfile
blob: 8601629cd4c88fb44dcb21a013357ce4e309d061 (plain)
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
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"]