-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
49 lines (32 loc) · 908 Bytes
/
Dockerfile
File metadata and controls
49 lines (32 loc) · 908 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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
FROM golang:1.25.4-alpine AS builder
WORKDIR /src/backend
COPY backend/go.mod backend/go.sum ./
RUN go mod download
COPY backend/ ./
RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 \
go build -trimpath -ldflags="-s -w" -o /out/switchboard .
FROM node:22-alpine AS ui-builder
WORKDIR /src/ui
RUN corepack enable
COPY ui/package.json ui/pnpm-lock.yaml ./
RUN pnpm install --frozen-lockfile
COPY ui/ ./
RUN pnpm build
FROM alpine:3.21
RUN apk add --no-cache \
bash \
ca-certificates \
dumb-init \
docker-cli \
openssh-client \
tzdata
WORKDIR /app
COPY --from=builder /out/switchboard /usr/local/bin/switchboard
COPY --from=ui-builder /src/ui/out /app/ui
COPY deploy/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
ENV API_PORT=80
ENV NGINX_CONF_GEN_ENABLED=1
ENV DOCKER_API_VERSION=1.49
EXPOSE 80 6060
ENTRYPOINT ["dumb-init", "--", "/entrypoint.sh"]