aboutsummaryrefslogtreecommitdiffhomepage
path: root/docs
diff options
context:
space:
mode:
authorGravatar Catena cyber <35799796+catenacyber@users.noreply.github.com>2021-09-08 18:13:52 +0200
committerGravatar GitHub <noreply@github.com>2021-09-08 09:13:52 -0700
commit0e3ee07ffd4b9b6cdb4bfae5ae53776b5ed61380 (patch)
treeb8d73752e028dd4d043b328e7cef0b2b6b10b58c /docs
parente39ef9c6361c79090c2adf4537d6eafb073e9522 (diff)
doc: use lang-specific base-builder images (#6415)
Diffstat (limited to 'docs')
-rw-r--r--docs/getting-started/new-project-guide/go_lang.md2
-rw-r--r--docs/getting-started/new-project-guide/jvm_lang.md2
-rw-r--r--docs/getting-started/new-project-guide/python_lang.md2
-rw-r--r--docs/getting-started/new-project-guide/rust_lang.md2
-rw-r--r--docs/getting-started/new_project_guide.md11
5 files changed, 19 insertions, 0 deletions
diff --git a/docs/getting-started/new-project-guide/go_lang.md b/docs/getting-started/new-project-guide/go_lang.md
index 600a6666..f64e6913 100644
--- a/docs/getting-started/new-project-guide/go_lang.md
+++ b/docs/getting-started/new-project-guide/go_lang.md
@@ -59,6 +59,8 @@ sanitizers:
### Dockerfile
+The Dockerfile should start by `FROM gcr.io/oss-fuzz-base/base-builder-go`
+
The OSS-Fuzz builder image has the latest stable release of Golang installed. In
order to install dependencies of your project, add `RUN git clone ...` command to
your Dockerfile.
diff --git a/docs/getting-started/new-project-guide/jvm_lang.md b/docs/getting-started/new-project-guide/jvm_lang.md
index fc48ade6..5d25d3cb 100644
--- a/docs/getting-started/new-project-guide/jvm_lang.md
+++ b/docs/getting-started/new-project-guide/jvm_lang.md
@@ -63,6 +63,8 @@ sanitizers:
### Dockerfile
+The Dockerfile should start by `FROM gcr.io/oss-fuzz-base/base-builder-jvm`
+
The OSS-Fuzz base Docker images already come with OpenJDK 15 pre-installed. If
you need Maven to build your project, you can install it by adding the following
line to your Dockerfile:
diff --git a/docs/getting-started/new-project-guide/python_lang.md b/docs/getting-started/new-project-guide/python_lang.md
index dfea5251..11744102 100644
--- a/docs/getting-started/new-project-guide/python_lang.md
+++ b/docs/getting-started/new-project-guide/python_lang.md
@@ -57,6 +57,8 @@ sanitizers:
### Dockerfile
+The Dockerfile should start by `FROM gcr.io/oss-fuzz-base/base-builder-python`
+
Because most dependencies are already pre-installed on the images, no
significant changes are needed in the Dockerfile for Python fuzzing projects.
You should simply clone the project, set a `WORKDIR`, and copy any necessary
diff --git a/docs/getting-started/new-project-guide/rust_lang.md b/docs/getting-started/new-project-guide/rust_lang.md
index 7d961ba4..11a3b511 100644
--- a/docs/getting-started/new-project-guide/rust_lang.md
+++ b/docs/getting-started/new-project-guide/rust_lang.md
@@ -61,6 +61,8 @@ fuzzing_engines:
### Dockerfile
+The Dockerfile should start by `FROM gcr.io/oss-fuzz-base/base-builder-rust`
+
The OSS-Fuzz builder image has the latest nightly release of Rust as well as
`cargo fuzz` pre-installed and in `PATH`. In the `Dockerfile` for your project
all you'll need to do is fetch the latest copy of your code and install any
diff --git a/docs/getting-started/new_project_guide.md b/docs/getting-started/new_project_guide.md
index a5a34f14..f23d0218 100644
--- a/docs/getting-started/new_project_guide.md
+++ b/docs/getting-started/new_project_guide.md
@@ -99,6 +99,7 @@ Programming language the project is written in. Values you can specify include:
* [`rust`]({{ site.baseurl }}//getting-started/new-project-guide/rust-lang/)
* [`python`]({{ site.baseurl }}//getting-started/new-project-guide/python-lang/)
* [`jvm` (Java, Kotlin, Scala and other JVM-based languages)]({{ site.baseurl }}//getting-started/new-project-guide/jvm-lang/)
+* [`swift`]({{ site.baseurl }}//getting-started/new-project-guide/swift/)
### primary_contact, auto_ccs {#primary}
The primary contact and list of other contacts to be CCed. Each person listed gets access to ClusterFuzz, including crash reports and fuzzer statistics, and are auto-cced on new bugs filed in the OSS-Fuzz
@@ -208,11 +209,21 @@ COPY build.sh fuzzer.cc $SRC/ # copy build script and other fuzze
```
In the above example, the git clone will check out the source to `$SRC/<checkout_dir>`.
+Depending on your project's language, you will use a different base image,
+for instance `FROM gcr.io/oss-fuzz-base/base-builder-go` for golang.
+
For an example, see
[expat/Dockerfile](https://github.com/google/oss-fuzz/tree/master/projects/expat/Dockerfile)
or
[syzkaller/Dockerfile](https://github.com/google/oss-fuzz/blob/master/projects/syzkaller/Dockerfile).
+In the case of a project with multiple languages/toolchains needed,
+you can run installation scripts `install_lang.sh` where lang is the language needed.
+You also need to setup environment variables needed by this toolchain, for example `GOPATH` is needed by golang.
+For an example, see
+[ecc-diff-fuzzer/Dockerfile](https://github.com/google/oss-fuzz/blob/master/projects/ecc-diff-fuzzer/Dockerfile).
+where we use `base-builder-rust`and install golang
+
## build.sh {#buildsh}
This file defines how to build binaries for [fuzz targets]({{ site.baseurl }}/reference/glossary/#fuzz-target) in your project.