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.
 
 
owl-blogs/Dockerfile

35 lines
505 B

##
## Build Container
##
FROM golang:1.20-alpine as build
RUN apk add --no-cache --update git gcc g++
WORKDIR /tmp/owl
COPY go.mod .
COPY go.sum .
RUN go mod download
COPY . .
RUN CGO_ENABLED=1 GOOS=linux go build -o ./out/owl ./cmd/owl
##
## Run Container
##
FROM alpine
RUN apk add ca-certificates
COPY --from=build /tmp/owl/out/ /bin/
# This container exposes port 8080 to the outside world
EXPOSE 3000
WORKDIR /owl
# Run the binary program produced by `go install`
ENTRYPOINT ["/bin/owl"]