forked from cilium/cilium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.builder
63 lines (58 loc) · 1.67 KB
/
Dockerfile.builder
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
#
# Cilium build-time dependencies.
# Image created from this file is used to build Cilium.
#
FROM docker.io/library/ubuntu:18.04
LABEL maintainer="[email protected]"
WORKDIR /go/src/github.com/cilium/cilium
#
# Env setup for Go (installed below)
#
ENV GOROOT /usr/local/go
ENV GOPATH /go
ENV PATH "$GOROOT/bin:$GOPATH/bin:$PATH"
ENV GO_VERSION 1.13.4
#
# Build dependencies
#
RUN apt-get update \
&& DEBIAN_FRONTEND=noninteractive apt-get upgrade -y --no-install-recommends \
&& DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
apt-utils \
binutils \
ca-certificates \
clang-7 \
coreutils \
curl \
gcc \
git \
iproute2 \
libc6-dev \
libc6-dev-i386 \
libelf-dev \
llvm-7 \
m4 \
make \
pkg-config \
python \
rsync \
unzip \
wget \
zip \
zlib1g-dev \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* \
&& update-alternatives --install /usr/bin/clang clang /usr/bin/clang-7 100 \
&& update-alternatives --install /usr/bin/llc llc /usr/bin/llc-7 100
#
# Install Go
#
RUN curl -sfL https://dl.google.com/go/go${GO_VERSION}.linux-amd64.tar.gz | tar -xzC /usr/local && \
go get -d -u github.com/gordonklaus/ineffassign && \
cd /go/src/github.com/gordonklaus/ineffassign && \
git checkout -b 1003c8bd00dc2869cb5ca5282e6ce33834fed514 1003c8bd00dc2869cb5ca5282e6ce33834fed514 && \
go install && \
go get -d github.com/cilium/go-bindata/... && \
cd /go/src/github.com/cilium/go-bindata && \
git checkout -b e950ad39c6092155a6d89f04c90b1c46d8c97d49 e950ad39c6092155a6d89f04c90b1c46d8c97d49 && \
go install github.com/cilium/go-bindata/go-bindata