aboutsummaryrefslogtreecommitdiff
path: root/cmd/seaweedfs-mount/Dockerfile
blob: 55cdd76091030d68553a3d0b84324e0fcd58c6b4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
FROM golang:1.24-alpine AS builder
RUN apk add git g++

RUN mkdir -p /go/src/github.com/seaweedfs/
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
RUN cd /go/src/github.com/seaweedfs/seaweedfs/weed && go install

RUN mkdir -p /go/src/github.com/seaweedfs/
RUN git clone https://github.com/seaweedfs/seaweedfs-csi-driver /go/src/github.com/seaweedfs/seaweedfs-csi-driver
RUN cd /go/src/github.com/seaweedfs/seaweedfs-csi-driver && \
    go build -ldflags="-s -w" -o /seaweedfs-mount ./cmd/seaweedfs-mount/main.go

FROM alpine AS final
RUN apk add  fuse
COPY --from=builder /go/bin/weed /usr/bin/
COPY --from=builder /seaweedfs-mount /

RUN chmod +x /seaweedfs-mount
ENTRYPOINT ["/seaweedfs-mount"]