mirror of
https://github.com/ZizzyDizzyMC/linx-server.git
synced 2026-01-23 02:14:33 +00:00
Updated Dockerfile
This commit is contained in:
parent
c8f7c32649
commit
dfa1152967
1 changed files with 7 additions and 6 deletions
13
Dockerfile
13
Dockerfile
|
|
@ -1,14 +1,15 @@
|
|||
FROM golang:1.14-alpine3.11 AS build
|
||||
FROM golang:1.22.4-alpine3.20 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 . \
|
||||
&& go mod download \
|
||||
&& go build -o /go/bin/linx-server . \
|
||||
&& apk del .build-deps
|
||||
|
||||
FROM alpine:3.11
|
||||
FROM alpine:3.20
|
||||
|
||||
COPY --from=build /go/bin/linx-server /usr/local/bin/linx-server
|
||||
|
||||
|
|
@ -18,11 +19,11 @@ 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/
|
||||
|
||||
RUN mkdir -p /data/files && mkdir -p /data/meta && mkdir -p /data/locks && chown -R 65534:65534 /data
|
||||
RUN mkdir -p /data/files && mkdir -p /data/meta && mkdir -p /data/locks && mkdir -p /data/custom_pages && chown -R 65534:65534 /data
|
||||
|
||||
VOLUME ["/data/files", "/data/meta", "/data/locks"]
|
||||
VOLUME ["/data/files", "/data/meta", "/data/locks", "/data/custom_pages"]
|
||||
|
||||
EXPOSE 8080
|
||||
USER nobody
|
||||
ENTRYPOINT ["/usr/local/bin/linx-server", "-bind=0.0.0.0:8080", "-filespath=/data/files/", "-metapath=/data/meta/", "-lockspath=/data/locks/"]
|
||||
ENTRYPOINT ["/usr/local/bin/linx-server", "-bind=0.0.0.0:8080", "-filespath=/data/files/", "-metapath=/data/meta/", "-lockspath=/data/locks/", "-custompagespath=/data/custom_pages"]
|
||||
CMD ["-sitename=linx", "-allowhotlink"]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue