ci(release): 🔥 add Dockerfile
This commit is contained in:
parent
48d280bab4
commit
0ffc3e89b0
1 changed files with 28 additions and 0 deletions
28
server/Dockerfile
Normal file
28
server/Dockerfile
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
FROM golang:1.21-alpine as builder
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
ENV CGO_ENABLED=1
|
||||||
|
ENV GOOS=linux
|
||||||
|
ENV GOARCH=amd64
|
||||||
|
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
|
||||||
|
|
||||||
|
RUN apk update && apk add build-base
|
||||||
|
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN go build -o recipe-manager .
|
||||||
|
|
||||||
|
FROM alpine:3.17
|
||||||
|
|
||||||
|
WORKDIR /app
|
||||||
|
|
||||||
|
RUN apk update && apk add --no-cache sqlite curl
|
||||||
|
|
||||||
|
COPY --from=builder /app/recipe-manager .
|
||||||
|
COPY --from=builder /app/app.env .
|
||||||
|
COPY --from=builder /app/client_secret.json .
|
||||||
|
|
||||||
|
# run the service on container startup.
|
||||||
|
CMD ["/app/recipe-manager"]
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue