ProfouzorsLinx/Dockerfile

29 lines
901 B
Docker
Raw Normal View History

2020-03-12 22:27:25 +01:00
FROM golang:1.14-alpine3.11 AS build
COPY . /go/src/github.com/andreimarcu/linx-server
WORKDIR /go/src/github.com/andreimarcu/linx-server
RUN set -ex \
&& apk add --no-cache --virtual .build-deps git \
&& go get -v . \
&& apk del .build-deps
2020-03-12 22:27:25 +01:00
FROM alpine:3.11
COPY --from=build /go/bin/linx-server /usr/local/bin/linx-server
ENV GOPATH /go
2019-01-25 08:33:11 +01:00
ENV SSL_CERT_FILE /etc/ssl/cert.pem
COPY static /go/src/github.com/andreimarcu/linx-server/static/
COPY templates /go/src/github.com/andreimarcu/linx-server/templates/
2021-12-24 02:21:45 +01:00
RUN mkdir -p /data/files && mkdir -p /data/meta && mkdir -p /data/locks && chown -R 65534:65534 /data
2021-12-24 02:21:45 +01:00
VOLUME ["/data/files", "/data/meta", "/data/locks"]
EXPOSE 8080
USER nobody
2021-12-24 02:21:45 +01:00
ENTRYPOINT ["/usr/local/bin/linx-server", "-bind=0.0.0.0:8080", "-filespath=/data/files/", "-metapath=/data/meta/", "-lockspath=/data/locks/"]
CMD ["-sitename=linx", "-allowhotlink"]