github.com/google/syzkaller@v0.0.0-20251211124644-a066d2bc4b02/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:20.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 sudo 12 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends make 13 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends nano 14 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends git 15 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends curl 16 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends ca-certificates 17 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends gnupg 18 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends apt-transport-https 19 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends software-properties-common 20 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends g++ 21 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends g++-arm-linux-gnueabi 22 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends g++-aarch64-linux-gnu 23 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends g++-powerpc64le-linux-gnu 24 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends g++-mips64el-linux-gnuabi64 25 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends g++-s390x-linux-gnu 26 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends linux-libc-dev:i386 27 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends lib32gcc-9-dev 28 RUN DEBIAN_FRONTEND=noninteractive apt-get install -y -q --no-install-recommends lib32stdc++-9-dev 29 RUN DEBIAN_FRONTEND=noninteractive apt-get -y autoremove 30 RUN DEBIAN_FRONTEND=noninteractive apt-get clean autoclean 31 RUN DEBIAN_FRONTEND=noninteractive rm -rf /var/lib/apt/lists/{apt,dpkg,cache,log} /tmp/* /var/tmp/* 32 33 # Since go 1.21 the toolchain required by go.mod is automatically downloaded. 34 # There is no need to version up golang here after go.mod changes. 35 RUN curl https://dl.google.com/go/go1.22.7.linux-amd64.tar.gz | tar -C /usr/local -xz 36 ENV PATH /usr/local/go/bin:/gopath/bin:$PATH 37 ENV GOPATH /gopath 38 39 # Install clang-12 from llvm.org. 40 # The distro-provided clang is too old for Go fuzzing. 41 RUN curl https://apt.llvm.org/llvm-snapshot.gpg.key | apt-key add - 42 RUN add-apt-repository "deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-12 main" 43 RUN apt-get update 44 RUN apt-get install -y -q --no-install-recommends clang-12 45 RUN ln -s /usr/bin/clang-12 /usr/bin/clang 46 47 # Pre-create dirs for syz-env. 48 # This is necessary to make docker work with the current user, 49 # otherwise --volume will create these dirs under root and then 50 # the current user won't have access to them. 51 RUN mkdir -p /syzkaller/gopath/src/github.com/google/syzkaller && \ 52 mkdir -p /syzkaller/.cache && \ 53 chmod -R 0777 /syzkaller 54 55 # The default Docker prompt is too ugly and takes the whole line: 56 # I have no name!@0f3331d2fb54:~/gopath/src/github.com/google/syzkaller$ 57 RUN echo "export PS1='syz-old-env⌛ '" > /syzkaller/.bashrc 58 ENV SYZ_OLD_ENV yes 59 60 ENTRYPOINT ["bash"]