github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/tools/docker/old-env/Dockerfile (about)

     1  # Copyright 2020 syzkaller project authors. All rights reserved.
     2  # Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file.
     3  
     4  # See /tools/docker/README.md for details.
     5  
     6  FROM ubuntu:16.04
     7  
     8  LABEL homepage="https://github.com/google/syzkaller"
     9  
    10  RUN dpkg --add-architecture i386 && apt-get update
    11  RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends \
    12  	sudo make nano git curl ca-certificates gnupg \
    13  	apt-transport-https software-properties-common g++ \
    14  	g++-arm-linux-gnueabi g++-aarch64-linux-gnu g++-powerpc64le-linux-gnu \
    15  	g++-mips64el-linux-gnuabi64 g++-s390x-linux-gnu \
    16  	linux-libc-dev:i386 lib32gcc-5-dev lib32stdc++-5-dev \
    17  	&& \
    18  	apt-get -y autoremove && \
    19  	apt-get clean autoclean && \
    20  	rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/*
    21  
    22  RUN curl https://dl.google.com/go/go1.21.9.linux-amd64.tar.gz | tar -C /usr/local -xz
    23  ENV PATH /usr/local/go/bin:/gopath/bin:$PATH
    24  ENV GOPATH /gopath
    25  
    26  # Install clang-12 from llvm.org.
    27  # The distro-provided clang is too old for Go fuzzing.
    28  RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add -
    29  RUN add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main"
    30  RUN apt-get update
    31  RUN apt-get install -y -q --no-install-recommends clang-12
    32  RUN ln -s /usr/bin/clang-12 /usr/bin/clang
    33  
    34  # Pre-create dirs for syz-env.
    35  # This is necessary to make docker work with the current user,
    36  # otherwise --volume will create these dirs under root and then
    37  # the current user won't have access to them.
    38  RUN mkdir -p /syzkaller/gopath/src/github.com/google/syzkaller && \
    39  	mkdir -p /syzkaller/.cache && \
    40  	chmod -R 0777 /syzkaller
    41  
    42  # The default Docker prompt is too ugly and takes the whole line:
    43  # I have no name!@0f3331d2fb54:~/gopath/src/github.com/google/syzkaller$
    44  RUN echo "export PS1='syz-old-env⌛ '" > /syzkaller/.bashrc
    45  ENV SYZ_OLD_ENV yes
    46  
    47  ENTRYPOINT ["bash"]