-
-
Notifications
You must be signed in to change notification settings - Fork 292
/
Dockerfile
24 lines (22 loc) · 728 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
FROM --platform=$BUILDPLATFORM node:alpine as front-builder
WORKDIR /app
COPY frontend/ ./
RUN npm install && npm run build
FROM golang:1.22-alpine AS backend-builder
WORKDIR /app
ARG TARGETARCH
ENV CGO_CFLAGS="-D_LARGEFILE64_SOURCE"
ENV CGO_ENABLED=1
ENV GOARCH=$TARGETARCH
RUN apk update && apk --no-cache --update add build-base gcc wget unzip
COPY backend/ ./
COPY --from=front-builder /app/dist/ /app/web/html/
RUN go build -ldflags="-w -s" -o sui main.go
FROM --platform=$TARGETPLATFORM alpine
LABEL org.opencontainers.image.authors="[email protected]"
ENV TZ=Asia/Tehran
WORKDIR /app
RUN apk add --no-cache --update ca-certificates tzdata
COPY --from=backend-builder /app/sui /app/
VOLUME [ "s-ui" ]
CMD [ "./sui" ]