aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.dockerignore5
-rw-r--r--syz-cluster/controller/Dockerfile11
-rw-r--r--syz-cluster/dashboard/Dockerfile12
-rw-r--r--syz-cluster/email-reporter/Dockerfile13
-rw-r--r--syz-cluster/reporter-server/Dockerfile11
-rw-r--r--syz-cluster/series-tracker/Dockerfile10
-rw-r--r--syz-cluster/tools/db-mgmt/Dockerfile11
-rw-r--r--syz-cluster/tools/send-test-email/Dockerfile15
-rw-r--r--syz-cluster/workflow/boot-step/Dockerfile8
-rw-r--r--syz-cluster/workflow/build-step/Dockerfile4
-rw-r--r--syz-cluster/workflow/fuzz-step/Dockerfile1
-rw-r--r--syz-cluster/workflow/triage-step/Dockerfile10
-rwxr-xr-xtools/check-copyright.sh3
13 files changed, 43 insertions, 71 deletions
diff --git a/.dockerignore b/.dockerignore
new file mode 100644
index 000000000..88971a7ac
--- /dev/null
+++ b/.dockerignore
@@ -0,0 +1,5 @@
+.gitignore
+bin/
+dashboard/
+!dashboard/dashapi/
+docs/
diff --git a/syz-cluster/controller/Dockerfile b/syz-cluster/controller/Dockerfile
index 8b48aa279..9a2ebd5c6 100644
--- a/syz-cluster/controller/Dockerfile
+++ b/syz-cluster/controller/Dockerfile
@@ -1,17 +1,16 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
+# Copyright 2025 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
FROM golang:1.24-alpine AS controller-builder
WORKDIR /build
# Prepare the dependencies.
-COPY go.mod ./
-COPY go.sum ./
+COPY go.mod go.sum ./
RUN go mod download
-COPY pkg/gcs/ pkg/gcs/
-COPY pkg/osutil/ pkg/osutil/
# Build the tool.
-COPY syz-cluster/controller/ syz-cluster/controller/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
+COPY --exclude=.git . .
RUN go build -o /bin/controller /build/syz-cluster/controller
# Build the container.
diff --git a/syz-cluster/dashboard/Dockerfile b/syz-cluster/dashboard/Dockerfile
index 42b64f4da..44211df1e 100644
--- a/syz-cluster/dashboard/Dockerfile
+++ b/syz-cluster/dashboard/Dockerfile
@@ -1,18 +1,16 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
+# Copyright 2025 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
FROM golang:1.24-alpine AS dashboard-builder
WORKDIR /build
# Prepare the dependencies.
-COPY go.mod ./
-COPY go.sum ./
+COPY go.mod go.sum ./
RUN go mod download
-COPY pkg/gcs/ pkg/gcs/
-COPY pkg/osutil/ pkg/osutil/
-COPY pkg/html/urlutil/ pkg/html/urlutil/
# Build the tool.
-COPY syz-cluster/dashboard/ syz-cluster/dashboard/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
+COPY --exclude=.git . .
RUN go build -o /bin/web-dashboard /build/syz-cluster/dashboard
# Build the container.
diff --git a/syz-cluster/email-reporter/Dockerfile b/syz-cluster/email-reporter/Dockerfile
index c2ac55a9f..21a10339f 100644
--- a/syz-cluster/email-reporter/Dockerfile
+++ b/syz-cluster/email-reporter/Dockerfile
@@ -1,19 +1,16 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
+# Copyright 2025 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
FROM golang:1.24-alpine AS email-reporter-builder
WORKDIR /build
# Prepare the dependencies.
-COPY go.mod ./
-COPY go.sum ./
+COPY go.mod go.sum ./
RUN go mod download
-COPY pkg/ pkg/
-COPY prog/ prog/
-COPY sys/targets/ sys/targets/
-COPY dashboard/dashapi/ dashboard/dashapi/
# Build the tool.
-COPY syz-cluster/email-reporter/ syz-cluster/email-reporter/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
+COPY --exclude=.git . .
RUN go build -o /bin/email-reporter /build/syz-cluster/email-reporter
# Build the container.
diff --git a/syz-cluster/reporter-server/Dockerfile b/syz-cluster/reporter-server/Dockerfile
index 82f34946c..1280ab9ed 100644
--- a/syz-cluster/reporter-server/Dockerfile
+++ b/syz-cluster/reporter-server/Dockerfile
@@ -1,17 +1,16 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
+# Copyright 2025 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
FROM golang:1.24-alpine AS reporter-builder
WORKDIR /build
# Prepare the dependencies.
-COPY go.mod ./
-COPY go.sum ./
+COPY go.mod go.sum ./
RUN go mod download
-COPY pkg/gcs/ pkg/gcs/
-COPY pkg/osutil/ pkg/osutil/
# Build the tool.
-COPY syz-cluster/reporter-server/ syz-cluster/reporter-server/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
+COPY --exclude=.git . .
RUN go build -o /bin/reporter-server /build/syz-cluster/reporter-server
# Build the container.
diff --git a/syz-cluster/series-tracker/Dockerfile b/syz-cluster/series-tracker/Dockerfile
index 697c31d82..a9ea9029e 100644
--- a/syz-cluster/series-tracker/Dockerfile
+++ b/syz-cluster/series-tracker/Dockerfile
@@ -1,3 +1,4 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
# Copyright 2024 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
@@ -10,14 +11,7 @@ COPY go.mod go.sum ./
RUN go mod download
# Build the tool.
-COPY pkg/ pkg/
-# TODO: get rid of this dependency.
-COPY prog/ prog/
-COPY dashboard/dashapi/ dashboard/dashapi/
-COPY sys/targets/ sys/targets/
-COPY syz-cluster/series-tracker/*.go syz-cluster/series-tracker/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
-
+COPY --exclude=.git . .
RUN go build -o /build/series-tracker-bin /build/syz-cluster/series-tracker
FROM ubuntu:latest
diff --git a/syz-cluster/tools/db-mgmt/Dockerfile b/syz-cluster/tools/db-mgmt/Dockerfile
index 31c3b12d3..9ea856821 100644
--- a/syz-cluster/tools/db-mgmt/Dockerfile
+++ b/syz-cluster/tools/db-mgmt/Dockerfile
@@ -1,17 +1,16 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
+# Copyright 2025 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
FROM golang:1.24-alpine AS builder
WORKDIR /build
# Prepare the dependencies.
-COPY go.mod ./
-COPY go.sum ./
+COPY go.mod 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/
+COPY --exclude=.git . .
RUN go build -o /bin/db-mgmt /build/syz-cluster/tools/db-mgmt
# Create the actual container.
diff --git a/syz-cluster/tools/send-test-email/Dockerfile b/syz-cluster/tools/send-test-email/Dockerfile
index 69706aff0..0a66349c2 100644
--- a/syz-cluster/tools/send-test-email/Dockerfile
+++ b/syz-cluster/tools/send-test-email/Dockerfile
@@ -1,21 +1,16 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
+# Copyright 2025 syzkaller project authors. All rights reserved.
+# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
FROM golang:1.24-alpine AS builder
WORKDIR /build
# Prepare the dependencies.
-COPY go.mod ./
-COPY go.sum ./
+COPY go.mod go.sum ./
RUN go mod download
-COPY dashboard/dashapi/ dashboard/dashapi/
-COPY pkg/gcs/ pkg/gcs/
-COPY pkg/email/ pkg/email/
-COPY pkg/auth/ pkg/auth/
-COPY pkg/gcpsecret/ pkg/gcpsecret/
# Build the tool.
-COPY syz-cluster/tools/send-test-email/*.go syz-cluster/tools/send-test-email/
-COPY dashboard/dashapi/ dashboard/dashapi/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
+COPY --exclude=.git . .
RUN go build -o /bin/send-email /build/syz-cluster/tools/send-test-email
# Create the actual container.
diff --git a/syz-cluster/workflow/boot-step/Dockerfile b/syz-cluster/workflow/boot-step/Dockerfile
index 573b13593..74e2a6627 100644
--- a/syz-cluster/workflow/boot-step/Dockerfile
+++ b/syz-cluster/workflow/boot-step/Dockerfile
@@ -17,15 +17,9 @@ WORKDIR /build
# Copy the code and the dependencies.
COPY go.mod go.sum ./
RUN go mod download
-COPY pkg/ pkg/
-COPY prog/ prog/
-COPY vm/ vm/
-COPY executor/ executor/
-COPY dashboard/dashapi/ dashboard/dashapi/
+COPY . .
# Copying from the builder to take the `make descriptions` result.
COPY --from=syzkaller-builder /build/sys/ sys/
-COPY syz-cluster/workflow/boot-step/*.go syz-cluster/workflow/boot-step/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
RUN go build -o /bin/boot-step /build/syz-cluster/workflow/boot-step
diff --git a/syz-cluster/workflow/build-step/Dockerfile b/syz-cluster/workflow/build-step/Dockerfile
index c3f2fb037..7f8849ffd 100644
--- a/syz-cluster/workflow/build-step/Dockerfile
+++ b/syz-cluster/workflow/build-step/Dockerfile
@@ -7,9 +7,7 @@ FROM gcr.io/syzkaller/env AS build-step-builder
WORKDIR /build
COPY go.mod go.sum ./
RUN go mod download
-COPY --exclude=syz-cluster . .
-COPY syz-cluster/workflow/build-step/*.go syz-cluster/workflow/build-step/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
+COPY . .
RUN go build -o /build/build-step-bin /build/syz-cluster/workflow/build-step
# Build on the latest syzbot image.
diff --git a/syz-cluster/workflow/fuzz-step/Dockerfile b/syz-cluster/workflow/fuzz-step/Dockerfile
index bc11e80da..c9466a509 100644
--- a/syz-cluster/workflow/fuzz-step/Dockerfile
+++ b/syz-cluster/workflow/fuzz-step/Dockerfile
@@ -10,7 +10,6 @@ COPY go.mod go.sum ./
RUN go mod download
COPY . .
RUN make TARGETARCH=amd64
-COPY syz-cluster/ syz-cluster/
RUN GO_FLAGS=$(make go-flags 2>/dev/null) && go build "$GO_FLAGS" -o /bin/fuzz-step /build/syz-cluster/workflow/fuzz-step
FROM debian:bookworm
diff --git a/syz-cluster/workflow/triage-step/Dockerfile b/syz-cluster/workflow/triage-step/Dockerfile
index 67110b863..782a31e3d 100644
--- a/syz-cluster/workflow/triage-step/Dockerfile
+++ b/syz-cluster/workflow/triage-step/Dockerfile
@@ -1,3 +1,4 @@
+# syntax=docker.io/docker/dockerfile:1.7-labs
# Copyright 2024 syzkaller project authors. All rights reserved.
# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
@@ -10,14 +11,7 @@ COPY go.mod go.sum ./
RUN go mod download
# Build the tool.
-COPY pkg/ pkg/
-# TODO: get rid of this dependency.
-COPY prog/ prog/
-COPY dashboard/dashapi/ dashboard/dashapi/
-COPY sys/targets/ sys/targets/
-COPY syz-cluster/workflow/triage-step/*.go syz-cluster/workflow/triage-step/
-COPY syz-cluster/pkg/ syz-cluster/pkg/
-
+COPY --exclude=.git . .
RUN go build -o /build/triage-step-bin /build/syz-cluster/workflow/triage-step
FROM ubuntu:latest
diff --git a/tools/check-copyright.sh b/tools/check-copyright.sh
index ba28df438..220498eab 100755
--- a/tools/check-copyright.sh
+++ b/tools/check-copyright.sh
@@ -6,7 +6,8 @@ FILES=0
FAILED=""
for F in $(find . -name "*.go" -o -name "*.sh" -o -name "*.cpp" -o -name "*.cc" -o -name "*.h" \
-o -name "*.S" -o -name "*.py" -o -name "*.yml" -o -name "*.yaml" -o -name "*.fbs" \
- -o \( -path "./sys/*/*.txt" \) | grep -E -v "/_include/|/gen/|/testdata/"); do
+ -o -name "Dockerfile" -o \( -path "./sys/*/*.txt" \) | \
+ grep -E -v "/_include/|/gen/|/testdata/"); do
((FILES+=1))
cat $F | tr '\n' '_' | grep -E "(//|#) Copyright 20[0-9]{2}(/20[0-9]{2})? syzkaller project authors\. All rights reserved\._(//|#) Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file\." >/dev/null
if [ $? -eq 0 ]; then continue; fi