golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/linux-arm64-bullseye/Dockerfile (about)

     1  # Copyright 2022 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 arm64v8/golang:1.19 AS build
     6  LABEL maintainer="golang-dev@googlegroups.com"
     7  
     8  RUN mkdir /gocache
     9  ENV GOCACHE /gocache
    10  
    11  COPY ./go.mod /go/src/golang.org/x/build/go.mod
    12  COPY ./go.sum /go/src/golang.org/x/build/go.sum
    13  
    14  WORKDIR /go/src/golang.org/x/build
    15  
    16  # Optimization for iterative docker build speed, not necessary for correctness:
    17  # TODO: write a tool to make writing Go module-friendly Dockerfiles easier.
    18  RUN go install cloud.google.com/go/compute/metadata
    19  
    20  COPY . /go/src/golang.org/x/build/
    21  
    22  # Install binary to /go/bin/stage0
    23  ENV CGO_ENABLED=0
    24  RUN go install golang.org/x/build/cmd/buildlet/stage0
    25  RUN go install golang.org/x/build/cmd/bootstrapswarm
    26  
    27  FROM arm64v8/debian:bullseye
    28  LABEL org.opencontainers.image.authors="golang-dev@googlegroups.com"
    29  
    30  ENV DEBIAN_FRONTEND noninteractive
    31  
    32  # bzr: Bazaar VCS supported by cmd/go
    33  # fonts-droid-fallback: required by x/mobile repo
    34  # fossil: Fossil VCS supported by cmd/go
    35  # gcc: for building Go's bootstrap 'dist' prog
    36  # gdb: optionally used by runtime tests for gdb
    37  # gfortran: for compiling cgo with fortran support (multilib for 386)
    38  # git: git VCS supported by cmd/go
    39  # libc6-dev: for building Go's bootstrap 'dist' prog
    40  # libgles2-mesa-dev: required by x/mobile repo
    41  # libopenal-dev: required by x/mobile repo
    42  # lsof: misc basic tool
    43  # make: used for setting up benchmarks in the x/benchmark builders
    44  # mercurial: mercurial VCS supported by cmd/go
    45  # netbase: for net package tests, issue 42750
    46  # procps: misc basic tool
    47  # psmisc: misc basic tool
    48  # strace: optionally used by some net/http tests
    49  # subversion: subversion VCS supported by cmd/go
    50  # swig: used for c/c++ interop related tests
    51  RUN apt-get update && apt-get install -y \
    52  	--no-install-recommends \
    53  	bzr \
    54  	ca-certificates \
    55  	curl \
    56  	fonts-droid-fallback \
    57  	fossil \
    58  	gcc \
    59  	gdb \
    60  	gfortran \
    61  	git \
    62  	iptables \
    63  	iproute2 \
    64  	libc6-dev \
    65  	libgles2-mesa-dev \
    66  	libopenal-dev \
    67  	lsof \
    68  	make \
    69  	mercurial \
    70  	netbase \
    71  	openssh-server \
    72  	procps \
    73  	psmisc \
    74  	strace \
    75  	subversion \
    76  	sudo \
    77  	swig \
    78  	&& rm -rf /var/lib/apt/lists/*
    79  
    80  COPY --from=build /go/bin/* /usr/local/bin/
    81  COPY cmd/buildlet/stage0/run-worker.sh /usr/local/bin/
    82  
    83  CMD ["/usr/local/bin/run-worker.sh"]