golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/crosscompile/linux-armhf-cross/Dockerfile (about)

     1  # Copyright 2016 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  # Linux builder VM running Debian, with cross compilers for linux-arm.
     6  # Docker tag gobuilders/linux-armhf-cross
     7  
     8  FROM golang/buildlet-stage0 AS stage0
     9  
    10  FROM debian:buster
    11  MAINTAINER golang-dev <golang-dev@googlegroups.com>
    12  
    13  ENV DEBIAN_FRONTEND noninteractive
    14  
    15  # git-core: for interacting with the Go source & subrepos
    16  # gcc, libc-dev: for building Go's bootstrap 'dist' prog
    17  # gcc-armhf-linux-gnu: for armhf builds
    18  # libc-dev(armhf): for asm/errno.h
    19  # procps, lsof, psmisc: misc tools
    20  RUN dpkg --add-architecture armhf \
    21  	&& apt-get update && apt-get install -y \
    22  	bzip2 \
    23  	ca-certificates \
    24  	curl \
    25  	git-core \
    26  	gcc \
    27  	libc6-dev \
    28  	gcc-arm-linux-gnueabihf \
    29  	libc-dev:armhf \
    30  	procps \
    31  	lsof \
    32  	psmisc \
    33  	sudo \
    34  	--no-install-recommends \
    35  	&& rm -rf /var/lib/apt/lists/*
    36  
    37  RUN mkdir -p /go1.4-amd64 \
    38  	&& ( \
    39  		curl --silent https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /go1.4-amd64 -zxv \
    40  	) \
    41  	&& mv /go1.4-amd64/go /go1.4 \
    42  	&& rm -rf /go1.4-amd64 \
    43  	&& rm -rf /go1.4/pkg/linux_amd64_race \
    44  		/go1.4/api \
    45  		/go1.4/blog \
    46  		/go1.4/doc \
    47  		/go1.4/misc \
    48  		/go1.4/test \
    49  	&& find /go1.4 -type d -name testdata | xargs rm -rf
    50  
    51  COPY --from=stage0 /go/bin/* /usr/local/bin/
    52  
    53  ENV GOROOT_BOOTSTRAP=/go1.4 GOOS=linux GOARCH=arm CC_FOR_TARGET=arm-linux-gnueabihf-gcc
    54  
    55  CMD ["/usr/local/bin/run-worker.sh"]