Some checks failed
Create and publish a Docker image 🚀 / build-and-push-image (push) Has been cancelled
23 lines
507 B
Docker
23 lines
507 B
Docker
FROM oven/bun AS build
|
|
WORKDIR /app
|
|
COPY bun.lock package.json ./
|
|
RUN bun install
|
|
COPY . .
|
|
RUN bun run build
|
|
|
|
FROM golang:alpine AS server_builder
|
|
WORKDIR /app
|
|
COPY go.mod ./
|
|
RUN go mod download
|
|
COPY main.go ./
|
|
COPY --from=frontend_builder /app/build ./build
|
|
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o main
|
|
|
|
FROM alpine:latest
|
|
WORKDIR /app
|
|
RUN apk add --no-cache ca-certificates
|
|
COPY --from=server_builder /app/main ./main
|
|
COPY --from=server_builder /app/build ./build
|
|
EXPOSE 8181
|
|
CMD ["./main"]
|