Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set up python in one docker layer. #3893

Merged
merged 2 commits into from
May 28, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions infra/base-images/base-builder/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,17 @@ RUN apt-get update && \
apt-get update && \
apt-get install -y \
binutils-dev \
build-essential \
curl \
git \
jq \
libc6-dev-i386 \
make \
subversion \
zip

# Build and install latest Python 3 (3.8.3).
ENV PYTHON_VERSION 3.8.3
RUN apt-get install -y \
build-essential \
RUN export PYTHON_DEPS="\
zlib1g-dev \
libncurses5-dev \
libgdbm-dev \
Expand All @@ -43,16 +42,17 @@ RUN apt-get install -y \
libreadline-dev \
libffi-dev \
libbz2-dev \
liblzma-dev
RUN cd /tmp/ && \
liblzma-dev" && \
apt-get install -y $PYTHON_DEPS && \
cd /tmp/ && \
curl -O https://www.python.org/ftp/python/$PYTHON_VERSION/Python-$PYTHON_VERSION.tar.xz && \
tar -xvf Python-$PYTHON_VERSION.tar.xz && \
cd Python-$PYTHON_VERSION && \
./configure --enable-optimizations && \
make -j install && \
cd .. && \
rm -r /tmp/Python-$PYTHON_VERSION.tar.xz /tmp/Python-$PYTHON_VERSION && \
apt-get remove -y libbz2-dev # https://github.com/google/oss-fuzz/issues/3888
apt-get remove -y $PYTHON_DEPS # https://github.com/google/oss-fuzz/issues/3888

# Download and install the latest stable Go.
ADD https://storage.googleapis.com/golang/getgo/installer_linux $SRC/
Expand Down