You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

21 lines
308 B

FROM golang:1.16-alpine AS pre
RUN apk --no-cache add gcc libc-dev
WORKDIR /build
COPY . .
RUN go build -o main ./cmd
#RUN CGO_ENABLED=1 go test -v -race -timeout 30s ./...
ENV CGO_ENABLED=0
FROM alpine:3.13 AS bin
RUN apk --no-cache add bash
WORKDIR /app
COPY --from=pre /build .
CMD ["/app/main"]