mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-04-23 02:48:34 +08:00
22
Dockerfile
22
Dockerfile
@@ -1,11 +1,23 @@
|
|||||||
|
|
||||||
|
FROM golang:1.23.0-alpine AS builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN go env -w GOPROXY=https://goproxy.cn,direct && go mod download
|
||||||
|
|
||||||
|
RUN go build -o pandax
|
||||||
|
|
||||||
|
|
||||||
FROM alpine:latest
|
FROM alpine:latest
|
||||||
LABEL MAINTAINER="PandaX"
|
LABEL MAINTAINER="PandaX"
|
||||||
|
|
||||||
WORKDIR /go/src/panda
|
WORKDIR /pandax
|
||||||
COPY ./pandax ./
|
COPY --from=builder /app/pandax ./
|
||||||
COPY ./config.yml ./
|
COPY --from=builder /app/config.yml ./
|
||||||
COPY ./resource ./resource
|
COPY --from=builder /app/resource ./resource
|
||||||
COPY ./uploads ./uploads
|
COPY --from=builder /app/uploads ./uploads
|
||||||
|
|
||||||
RUN chmod 755 ./pandax
|
RUN chmod 755 ./pandax
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user