Create Dockerfile

This commit is contained in:
Alterem 2024-05-16 23:44:24 +08:00 committed by GitHub
parent df2da86c58
commit cbee1cc373
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 17 additions and 0 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM golang:1.21-alpine AS builder
WORKDIR $GOPATH/override
ADD . $GOPATH/override
RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o override
FROM alpine:latest
COPY --from=builder $GOPATH/override/override /usr/local/bin/override
WORKDIR /app
ENTRYPOINT ["/usr/local/bin/override"]
EXPOSE 8181