forked from chr-fritz/csi-sshfs
-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile.debug
More file actions
25 lines (19 loc) · 765 Bytes
/
Dockerfile.debug
File metadata and controls
25 lines (19 loc) · 765 Bytes
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
FROM golang:1.15-alpine AS build-env
RUN apk add --no-cache git \
&& go get github.com/go-delve/delve/cmd/dlv
ENV CGO_ENABLED=0
WORKDIR /go/src/github.com/Patricol/csi-sshfs
#COPY go.mod .
#COPY go.sum .
#RUN go mod download
COPY . .
RUN go get ./...
RUN export BUILD_TIME=$(date -R) \
&& go build -o /csi-sshfs -ldflags "-X 'github.com/Patricol/csi-sshfs/pkg/sshfs.BuildTime=${BUILD_TIME}'" -gcflags "all=-N -l" github.com/Patricol/csi-sshfs/cmd/csi-sshfs
FROM alpine:latest
EXPOSE 40000
RUN apk add --no-cache ca-certificates sshfs findmnt libc6-compat
COPY --from=build-env /csi-sshfs /bin/csi-sshfs
COPY --from=build-env /go/bin/dlv /
ENTRYPOINT ["/dlv", "--listen=:40000", "--headless=true", "--api-version=2", "exec", "/bin/csi-sshfs", "--"]
CMD [""]