-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
31 lines (22 loc) · 805 Bytes
/
Dockerfile
File metadata and controls
31 lines (22 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM --platform=${BUILDPLATFORM} node:20.12.2-bullseye AS node-builder
WORKDIR /build
COPY frontend/package.json frontend/yarn.lock ./
RUN yarn config set registry 'https://registry.npmmirror.com' && \
yarn install
COPY frontend .
RUN yarn build-only
FROM golang:1.23.0-alpine3.19 AS builder
WORKDIR /build
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
apk add --no-cache ca-certificates gcc libtool make musl-dev protoc git && \
go env -w GOPROXY=https://goproxy.cn,direct
COPY Makefile go.mod go.sum ./
RUN make init && go mod download
COPY . .
COPY --from=node-builder /build/dist ./internal/server/static
RUN make build
FROM alpine:3.19
WORKDIR /app
COPY --from=builder /build/_output/bin/aurora /app/
EXPOSE 8080
ENTRYPOINT ["/app/aurora"]