golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/linux-x86-bookworm/Dockerfile (about) 1 # Copyright 2023 The Go Authors. All rights reserved. 2 # Use of this source code is governed by a BSD-style 3 # license that can be found in the LICENSE file. 4 5 FROM golang/buildlet-stage0 AS stage0 6 7 # Build perf_to_profile to make go tool pprof work with perf.data files. 8 FROM debian:bookworm AS perftoprofile 9 LABEL maintainer="golang-dev@googlegroups.com" 10 11 ENV DEBIAN_FRONTEND noninteractive 12 13 RUN apt-get update && apt-get install -y \ 14 --no-install-recommends \ 15 ca-certificates \ 16 curl \ 17 g++ \ 18 git \ 19 libelf-dev \ 20 libcap-dev 21 22 RUN curl -L "https://github.com/bazelbuild/bazelisk/releases/download/v1.19.0/bazelisk-linux-amd64" > bazelisk && \ 23 chmod +x bazelisk 24 25 RUN git clone https://github.com/google/perf_data_converter && \ 26 cd perf_data_converter && \ 27 /bazelisk build //src:perf_to_profile && \ 28 cp bazel-bin/src/perf_to_profile /perf_to_profile.exe # COPY --from won't be able to resolve symlink, so do it now. 29 30 # Actual image build. 31 FROM debian:bookworm 32 MAINTAINER golang-dev <golang-dev@googlegroups.com> 33 34 ENV DEBIAN_FRONTEND noninteractive 35 36 # bzr: Bazaar VCS supported by cmd/go 37 # fonts-droid-fallback: required by x/mobile repo 38 # fossil: Fossil VCS supported by cmd/go 39 # gcc-multilib: for 32-bit builds 40 # gcc: for building Go's bootstrap 'dist' prog 41 # gdb: optionally used by runtime tests for gdb 42 # gfortran: for compiling cgo with fortran support (multilib for 386) 43 # git: git VCS supported by cmd/go 44 # less: misc basic tool 45 # libc6-dev-i386: for 32-bit builds 46 # libc6-dev: for building Go's bootstrap 'dist' prog 47 # libgles2-mesa-dev: required by x/mobile repo 48 # libopenal-dev: required by x/mobile repo 49 # linux-perf: for performance analysis on perf builders 50 # lsof: misc basic tool 51 # make: used for setting up benchmarks in the x/benchmark builders 52 # mercurial: mercurial VCS supported by cmd/go 53 # netbase: for net package tests, issue 42750 54 # procps: misc basic tool 55 # psmisc: misc basic tool 56 # strace: optionally used by some net/http tests 57 # subversion: subversion VCS supported by cmd/go 58 # swig: used for c/c++ interop related tests 59 RUN apt-get update && apt-get install -y \ 60 --no-install-recommends \ 61 bzr \ 62 ca-certificates \ 63 curl \ 64 fonts-droid-fallback \ 65 fossil \ 66 gcc \ 67 gcc-multilib \ 68 gdb \ 69 gfortran \ 70 gfortran-multilib \ 71 git \ 72 iptables \ 73 iproute2 \ 74 less \ 75 libc6-dev \ 76 libc6-dev-i386 \ 77 libgles2-mesa-dev \ 78 libopenal-dev \ 79 linux-perf \ 80 lsof \ 81 make \ 82 mercurial \ 83 netbase \ 84 openssh-server \ 85 procps \ 86 psmisc \ 87 strace \ 88 subversion \ 89 sudo \ 90 swig \ 91 && rm -rf /var/lib/apt/lists/* 92 93 COPY --from=stage0 /go/bin/* /usr/local/bin/ 94 COPY --from=perftoprofile /perf_to_profile.exe /usr/local/bin/perf_to_profile 95 96 CMD ["/usr/local/bin/run-worker.sh"]