/
Dockerfile
81 lines (74 loc) · 2.16 KB
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
# Copyright 2021 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
FROM golang/buildlet-stage0 AS stage0
FROM debian:bullseye
MAINTAINER golang-dev <golang-dev@googlegroups.com>
ENV DEBIAN_FRONTEND noninteractive
# bzr: Bazaar VCS supported by cmd/go
# fonts-droid-fallback: required by x/mobile repo
# fossil: Fossil VCS supported by cmd/go
# gcc-multilib: for 32-bit builds
# gcc: for building Go's bootstrap 'dist' prog
# gdb: optionally used by runtime tests for gdb
# gfortran: for compiling cgo with fortran support (multilib for 386)
# git: git VCS supported by cmd/go
# gpg: the presence of a gpg binary can influence git behavior for cmd/go tests
# libc6-dev-i386: for 32-bit builds
# libc6-dev: for building Go's bootstrap 'dist' prog
# libgles2-mesa-dev: required by x/mobile repo
# libopenal-dev: required by x/mobile repo
# lsof: misc basic tool
# make: used for setting up benchmarks in the x/benchmark builders
# mercurial: mercurial VCS supported by cmd/go
# netbase: for net package tests, issue 42750
# procps: misc basic tool
# psmisc: misc basic tool
# strace: optionally used by some net/http tests
# subversion: subversion VCS supported by cmd/go
# swig: used for c/c++ interop related tests
RUN apt-get update && apt-get install -y \
--no-install-recommends \
bzr \
ca-certificates \
curl \
fonts-droid-fallback \
fossil \
gcc \
gcc-multilib \
gdb \
gfortran \
gfortran-multilib \
git \
gpg \
iptables \
libc6-dev \
libc6-dev-i386 \
libgles2-mesa-dev \
libopenal-dev \
lsof \
make \
mercurial \
netbase \
openssh-server \
procps \
psmisc \
strace \
subversion \
swig \
&& rm -rf /var/lib/apt/lists/*
RUN mkdir -p /go1.4-amd64 \
&& ( \
curl --silent https://storage.googleapis.com/golang/go1.4.linux-amd64.tar.gz | tar -C /go1.4-amd64 -zxv \
) \
&& mv /go1.4-amd64/go /go1.4 \
&& rm -rf /go1.4-amd64 \
&& rm -rf /go1.4/pkg/linux_amd64_race \
/go1.4/api \
/go1.4/blog \
/go1.4/doc \
/go1.4/misc \
/go1.4/test \
&& find /go1.4 -type d -name testdata | xargs rm -rf
COPY --from=stage0 /go/bin/stage0 /usr/local/bin/stage0
CMD ["/usr/local/bin/stage0"]