Skip to content

Commit

Permalink
Don't use centipede's install script (#8870)
Browse files Browse the repository at this point in the history
We can't simply autoremove the packages it installs and it adds 500 MB
to the image size.
Install the only dependency we don't already have libssl-dev since it is very small anyway.
  • Loading branch information
jonathanmetzman committed Oct 26, 2022
1 parent 8627954 commit bc02fd0
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 6 deletions.
6 changes: 3 additions & 3 deletions infra/base-images/base-builder/precompile_centipede
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ echo -n "Precompiling centipede"

# Build Centipede with bazel.
cd "$SRC/centipede/"
./install_dependencies_debian.sh
apt-get install libssl-dev -y
unset CXXFLAGS CFLAGS
echo 'build --cxxopt=-stdlib=libc++ --linkopt=-lc++' >> /tmp/centipede.bazelrc
bazel --bazelrc=/tmp/centipede.bazelrc build -c opt :all

Expand All @@ -29,8 +30,7 @@ bazel --bazelrc=/tmp/centipede.bazelrc build -c opt :all
# data-flow tracing flags, but will still throw errors when they cannot find
# the corresponding functions.
# The weak symbols provides fake implementations for intermediate binaries.
/clang/bin/clang++ "$SRC/centipede/weak_sancov_stubs.cc" -c -o \
"$SRC/centipede/weak.o"
$CXX "$SRC/centipede/weak_sancov_stubs.cc" -c -o "$SRC/centipede/weak.o"

echo 'Removing extra stuff leftover to avoid bloating image.'

Expand Down
3 changes: 2 additions & 1 deletion projects/envoy/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@ RUN apt-get update && apt-get -y install \
libtool \
wget \
golang \
rsync
rsync \
python3

RUN git clone https://github.com/envoyproxy/envoy.git
WORKDIR $SRC/envoy/
Expand Down
2 changes: 1 addition & 1 deletion projects/libraw/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
################################################################################

FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config
RUN apt-get update && apt-get install -y make autoconf automake libtool pkg-config zlib1g-dev
RUN git clone --depth 1 https://github.com/libraw/libraw
WORKDIR libraw

Expand Down
2 changes: 1 addition & 1 deletion projects/librdkafka/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
#
################################################################################
FROM gcr.io/oss-fuzz-base/base-builder
RUN apt-get update && apt-get install -y make cmake flex bison
RUN apt-get update && apt-get install -y make cmake flex bison zlib1g-dev
RUN git clone https://github.com/edenhill/librdkafka

WORKDIR $SRC
Expand Down

0 comments on commit bc02fd0

Please sign in to comment.