aboutsummaryrefslogtreecommitdiff
path: root/infra
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2021-03-09 08:32:50 -0800
committerGitHub <noreply@github.com>2021-03-09 08:32:50 -0800
commit39483b8403d26e1a4910fdc9d38222aac469ed50 (patch)
tree9822081288a3ce04a20cc20761743cb989867b51 /infra
parentfb720ead0e6730a587419e932ea2fdab497fa77c (diff)
downloadoss-fuzz-39483b8403d26e1a4910fdc9d38222aac469ed50.tar.gz
[CIFuzz][cifuzz-base] Slim down cifuzz-base (#5288)
Reduce cifuzz-base size from 846MB to 444MB. 1. Don't install parts of docker that aren't necessary. 2. Use .dockerignore properly.
Diffstat (limited to 'infra')
-rw-r--r--infra/.dockerignore3
-rw-r--r--infra/cifuzz/cifuzz-base/Dockerfile24
2 files changed, 11 insertions, 16 deletions
diff --git a/infra/.dockerignore b/infra/.dockerignore
index 1e82e3e75..8835a70c6 100644
--- a/infra/.dockerignore
+++ b/infra/.dockerignore
@@ -1 +1,2 @@
-test_files \ No newline at end of file
+cifuzz/test_files/*
+testcases/* \ No newline at end of file
diff --git a/infra/cifuzz/cifuzz-base/Dockerfile b/infra/cifuzz/cifuzz-base/Dockerfile
index 0aee3b2cf..e0599dbbe 100644
--- a/infra/cifuzz/cifuzz-base/Dockerfile
+++ b/infra/cifuzz/cifuzz-base/Dockerfile
@@ -14,25 +14,19 @@
#
################################################################################
+# Don't bother with a slimmer base image.
+# When we pull base-builder to build project builder image we need to pull
+# ubuntu:16.04 anyway. So in the long run we probably would waste time if
+# we pulled something like alpine here instead.
FROM ubuntu:16.04
-RUN apt-get update && apt-get install -y git \
- apt-transport-https \
- ca-certificates \
- curl \
- gnupg2 \
- software-properties-common \
- python3
+RUN apt-get update && \
+ apt-get install ca-certificates wget python3 git-core --no-install-recommends -y && \
+ wget https://download.docker.com/linux/ubuntu/dists/xenial/pool/stable/amd64/docker-ce-cli_20.10.5~3-0~ubuntu-xenial_amd64.deb -O /tmp/docker-ce.deb && \
+ dpkg -i /tmp/docker-ce.deb && rm /tmp/docker-ce.deb && \
+ apt-get remove wget -y --purge
-RUN curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - && apt-key fingerprint 0EBFCD88
-RUN add-apt-repository \
- "deb [arch=amd64] https://download.docker.com/linux/ubuntu \
- xenial \
- stable"
-
-RUN apt-get update && apt-get install docker-ce docker-ce-cli containerd.io -y
-
ENV OSS_FUZZ_ROOT=/opt/oss-fuzz
ADD . ${OSS_FUZZ_ROOT}
RUN rm -rf ${OSS_FUZZ_ROOT}/infra \ No newline at end of file