-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
33 lines (26 loc) · 787 Bytes
/
Copy pathDockerfile
File metadata and controls
33 lines (26 loc) · 787 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
FROM node:26-alpine AS frontend
WORKDIR /frontend
COPY frontend/package.json frontend/package-lock.json ./
RUN npm install
COPY frontend/ .
RUN npm run build
FROM golang:1.26.4-alpine AS builder
WORKDIR /app
RUN apk --no-cache add ca-certificates tzdata
COPY go.mod go.sum* ./
RUN go mod download
COPY . .
RUN CGO_ENABLED=0 go build \
-ldflags="-w -s" \
-a \
-installsuffix cgo \
-o solis ./cmd/main.go
FROM scratch
WORKDIR /app
COPY --from=ghcr.io/tarampampam/microcheck:1 /bin/httpcheck /bin/httpcheck
COPY --from=builder /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=builder /usr/share/zoneinfo /usr/share/zoneinfo
COPY --from=builder /app/solis /app
COPY --from=frontend /frontend/dist /app/frontend/dist
EXPOSE 8080
ENTRYPOINT ["/app/solis"]