aboutsummaryrefslogtreecommitdiffstats
path: root/syz-cluster/workflow/boot-step/Dockerfile
blob: 74e2a6627a45f1761c8b658b5205500363d32dac (plain)
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
# 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.

# Build syzkaller.
FROM gcr.io/syzkaller/env as syzkaller-builder
WORKDIR /build
# First query the modules to facilitate caching.
COPY go.mod go.sum ./
RUN go mod download
COPY --exclude=syz-cluster . .
RUN make TARGETARCH=amd64

FROM golang:1.24-alpine AS boot-step-builder
WORKDIR /build

# Copy the code and the dependencies.
COPY go.mod go.sum ./
RUN go mod download
COPY . .
# Copying from the builder to take the `make descriptions` result.
COPY --from=syzkaller-builder /build/sys/ sys/

RUN go build -o /bin/boot-step /build/syz-cluster/workflow/boot-step

FROM debian:bookworm

RUN apt-get update && \
    apt-get install -y qemu-system openssh-client

# pkg/osutil uses syzkaller user for sandboxing.
RUN useradd --create-home syzkaller

COPY --from=syzkaller-builder /build/bin/ /syzkaller/bin/
COPY --from=boot-step-builder /bin/boot-step /bin/boot-step

ENTRYPOINT ["/bin/boot-step"]