Files
astra-users/Dockerfile
2023-08-08 21:59:48 +03:00

26 lines
547 B
Docker

FROM kandrusyak/go-build as build
LABEL authors="andrusyakka@dopcore.com"
WORKDIR /
COPY go.mod ./
RUN go mod download
COPY . ./
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
FROM alpine:edge
WORKDIR /
COPY . .
COPY --from=build /go/bin/dlv dlv
COPY --from=build /app app
EXPOSE 8080
ENTRYPOINT [ "/dlv" , "--listen=:40000", "--headless=true", "--api-version=2", "--accept-multiclient", "exec", "/app"]