aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/tools/db-mgmt/Dockerfile
blob: 31c3b12d37a2354c01c83bdd0d8664523414d2d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
FROM golang:1.24-alpine AS builder

WORKDIR /build

# Prepare the dependencies.
COPY go.mod ./
COPY go.sum ./
RUN go mod download
COPY pkg/gcs/ pkg/gcs/
COPY pkg/osutil/ pkg/osutil/

# Build the tool.
COPY syz-cluster/tools/db-mgmt/*.go syz-cluster/tools/db-mgmt/
COPY syz-cluster/pkg/ syz-cluster/pkg/
RUN go build -o /bin/db-mgmt /build/syz-cluster/tools/db-mgmt

# Create the actual container.
FROM alpine:latest
WORKDIR /app

COPY --from=builder /bin/db-mgmt /bin/db-mgmt

ENTRYPOINT ["/bin/db-mgmt"]