Files
astra-users/Dockerfile
Kirill Andrusyak 96f01b08fd update pipeline
2023-09-04 23:25:06 +00:00

25 lines
683 B
Docker

FROM docker.io/golang:1.21rc3 AS build
LABEL authors="andrusyakka@dopcore.com"
WORKDIR /
COPY . .
RUN go mod download
#RUN CGO_ENABLED=0 go get -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv
#RUN CGO_ENABLED=0 go install -ldflags "-s -w -extldflags '-static'" github.com/go-delve/delve/cmd/dlv
#RUN CGO_ENABLED=0 go build -gcflags "all=-N -l" -o ./app
RUN CGO_ENABLED=0 go build -o ./app
FROM docker.io/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"]
ENTRYPOINT [ "/app"]