-
-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy pathDockerfile.multiarch
More file actions
32 lines (29 loc) · 766 Bytes
/
Dockerfile.multiarch
File metadata and controls
32 lines (29 loc) · 766 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
32
FROM node:22-alpine AS player
WORKDIR /app
COPY ./web/player/package*.json ./
RUN npm install
COPY ./web/player .
RUN npm run build
FROM node:22-alpine AS studio
WORKDIR /app
COPY ./web/studio/package*.json ./
RUN npm install
COPY ./web/studio .
RUN npm run build
FROM golang:1.26-alpine AS server
ARG TARGETOS
ARG TARGETARCH
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY cmd/ ./cmd/
COPY internal/ ./internal/
RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} go build -ldflags="-s -w" -o /app/bin/main ./cmd/main.go
FROM alpine:latest
WORKDIR /app
RUN apk add --no-cache ffmpeg
COPY --from=server /app/bin/main .
COPY --from=player /app/dist ./web/player/dist
COPY --from=studio /app/dist ./web/studio/dist
EXPOSE 7331
ENTRYPOINT ["./main"]