golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/crosscompile/linux-armel-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  # Debian buildlet image with cross compilers for linux-arm-arm5.
     6  # Docker tag gobuilders/linux-armel-stretch
     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  # curl: for getting and unpacking Go 1.4 source
    16  # git-core: for interacting with the Go source & subrepos
    17  # gcc, libc-dev: for building Go's bootstrap 'dist' prog
    18  # gcc-arm-linux-gnueabi, libc6-dev-armel-cross: for armel builds
    19  # linux-libc-dev(armel): for asm/errno.h
    20  # procps, lsof, psmisc: misc tools
    21  RUN dpkg --add-architecture armel \
    22  	&& apt-get update && apt-get install -y \
    23  	bzip2 \
    24  	ca-certificates \
    25  	curl \
    26  	git-core \
    27  	gcc \
    28  	libc6-dev \
    29  	gcc-arm-linux-gnueabi \
    30  	libc6-dev-armel-cross \
    31  	linux-libc-dev:armel \
    32  	procps \
    33  	lsof \
    34  	psmisc \
    35  	sudo \
    36  	--no-install-recommends \
    37  	&& rm -rf /var/lib/apt/lists/*
    38  
    39  RUN mkdir -p /go1.4-amd64 \
    40  	&& ( \
    41  		curl --silent https://storage.googleapis.com/golang/go1.4.3.linux-amd64.tar.gz | tar -C /go1.4-amd64 -zxv \
    42  	) \
    43  	&& mv /go1.4-amd64/go /go1.4 \
    44  	&& rm -rf /go1.4-amd64 \
    45  	&& rm -rf /go1.4/pkg/linux_amd64_race \
    46  		/go1.4/api \
    47  		/go1.4/blog \
    48  		/go1.4/doc \
    49  		/go1.4/misc \
    50  		/go1.4/test \
    51  	&& find /go1.4 -type d -name testdata | xargs rm -rf
    52  
    53  COPY --from=stage0 /go/bin/* /usr/local/bin/
    54  
    55  ENV GOROOT_BOOTSTRAP=/go1.4 GOOS=linux GOARCH=arm CC_FOR_TARGET=arm-linux-gnueabi-gcc
    56  
    57  CMD ["/usr/local/bin/run-worker.sh"]