forked from influxdata/kapacitor
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile_build_ubuntu64
65 lines (54 loc) · 1.88 KB
/
Dockerfile_build_ubuntu64
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
FROM ubuntu:16.04
# This dockerfile is capabable of performing all
# build/test/package/deploy actions needed for Kapacitor.
MAINTAINER [email protected]
RUN apt-get -qq update && apt-get -qq install -y \
python-software-properties \
software-properties-common \
wget \
unzip \
git \
mercurial \
make \
ruby \
ruby-dev \
rpm \
zip \
python \
python-boto \
build-essential \
autoconf \
automake \
libtool \
python-setuptools \
curl
RUN gem install fpm
# Install protobuf3 protoc binary
ENV PROTO_VERSION 3.4.0
RUN wget -q https://github.com/google/protobuf/releases/download/v${PROTO_VERSION}/protoc-${PROTO_VERSION}-linux-x86_64.zip \
&& unzip -j protoc-${PROTO_VERSION}-linux-x86_64.zip bin/protoc -d /bin \
rm protoc-${PROTO_VERSION}-linux-x86_64.zip
# Install protobuf3 python library
RUN wget -q https://github.com/google/protobuf/releases/download/v${PROTO_VERSION}/protobuf-python-${PROTO_VERSION}.tar.gz \
&& tar -xf protobuf-python-${PROTO_VERSION}.tar.gz \
&& cd /protobuf-${PROTO_VERSION}/python \
&& python setup.py install \
&& rm -rf /protobuf-${PROTO_VERSION} protobuf-python-${PROTO_VERSION}.tar.gz
# Install go
ENV GOPATH /root/go
ENV GO_VERSION 1.10.2
ENV GO_ARCH amd64
RUN wget -q https://storage.googleapis.com/golang/go${GO_VERSION}.linux-${GO_ARCH}.tar.gz; \
tar -C /usr/local/ -xf /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz ; \
rm /go${GO_VERSION}.linux-${GO_ARCH}.tar.gz
ENV PATH /usr/local/go/bin:$PATH
ENV PROJECT_DIR $GOPATH/src/github.com/influxdata/kapacitor
ENV PATH $GOPATH/bin:$PATH
RUN mkdir -p $PROJECT_DIR
WORKDIR $PROJECT_DIR
VOLUME $PROJECT_DIR
VOLUME /root/go/src
# Configure local git
RUN git config --global user.email "[email protected]"
RUN git config --global user.Name "Docker Builder"
ENTRYPOINT [ "/root/go/src/github.com/influxdata/kapacitor/build.py" ]