aboutsummaryrefslogtreecommitdiffstats
path: root/debug/dockerfile-debug
blob: 296ab318ae92bc44fd76a65c1904a1f90a4a0552 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM golang:alpine as build

WORKDIR /

COPY . .

RUN CGO_ENABLED=0 go install github.com/go-delve/delve/cmd/dlv@latest
#RUN CGO_ENABLED=0 go get -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv
RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -o ./app ./cmd/dbasik-api 

FROM scratch
COPY --from=build /go/bin/dlv /dlv
COPY --from=build /app /app
CMD ["/dlv"]