-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
42 lines (25 loc) · 790 Bytes
/
Copy pathDockerfile
File metadata and controls
42 lines (25 loc) · 790 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
FROM node:24-alpine AS css
WORKDIR /build
COPY package.json ./
RUN npm install
COPY tailwind.src.css ./
COPY assets/templates ./assets/templates
RUN npm run build:css
# -----------------------------------
FROM golang:1.26-alpine AS builder
RUN apk add --no-cache gcc musl-dev
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
COPY . .
COPY --from=css /build/assets/static/css/tailwind.css ./assets/static/css/tailwind.css
ARG VERSION
RUN CGO_ENABLED=1 GOOS=linux go build -ldflags="-w -s -X main.version=${VERSION}" -o /domaindex ./cmd/server
# -----------------------------------
FROM alpine:3.21
RUN apk add --no-cache ca-certificates tzdata
WORKDIR /app
COPY --from=builder /domaindex /app/domaindex
EXPOSE 8080
VOLUME ["/app/data"]
ENTRYPOINT ["/app/domaindex"]