zprox_bkup_1/app/Dockerfile
Zeev Diukman 4e11d7f366 4
2024-08-24 05:11:39 +03:00

26 lines
420 B
Docker

FROM golang:alpine as builder
WORKDIR /go/src/app
# Get Reflex for live reload in dev
ENV GO111MODULE=on
RUN go install github.com/cespare/reflex@latest
COPY go.mod .
# COPY ./app/go.sum .
RUN go mod download
COPY . .
RUN go build -o ./run .
FROM alpine:latest
RUN apk --no-cache add ca-certificates
WORKDIR /root/
#Copy executable from builder
COPY --from=builder /go/src/app/run .
# EXPOSE 8080
CMD ["./run"]