forked from googleapis/artman
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
102 lines (85 loc) · 2.87 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
FROM ubuntu:14.04
# Set the locale
RUN locale-gen en_US.UTF-8
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
# Install essential packages.
RUN apt-get update && apt-get install -y --no-install-recommends \
build-essential \
man-db \
pkg-config \
# Needed by gcloud-python
libffi-dev \
# Needed by gcloud-python
libssl-dev \
curl \
kdiff3 \
git \
vim # for debug
# Install runtime packages.
RUN apt-get update && \
apt-get install -y \
ruby \
python \
python-dev \
python-pip \
unzip \
perl \
software-properties-common
# Install Oracle JDK 8
RUN add-apt-repository ppa:openjdk-r/ppa
RUN apt-get update && apt-get install -y openjdk-8-jdk
# Setup JAVA_HOME, this is useful for docker commandline
ENV JAVA_HOME /usr/lib/jvm/java-8-openjdk-amd64/
RUN export JAVA_HOME
# Install NodeJS
ADD ./scripts /scripts
WORKDIR /scripts
# This is need to install nodejs 4.x otherwise nodejs 0.x will be installed.
RUN bash setup_node4.sh
RUN apt-get install -y nodejs
# Install linuxbrew.
RUN useradd -m -s /bin/bash linuxbrew
RUN echo 'linuxbrew ALL=(ALL) NOPASSWD:ALL' >>/etc/sudoers
USER linuxbrew
WORKDIR /home/linuxbrew
ENV PATH /home/linuxbrew/.linuxbrew/bin:/home/linuxbrew/.linuxbrew/sbin:$PATH
ENV SHELL /bin/bash
RUN yes |ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install)"
RUN brew doctor || true
# Install protoc and grpc.
RUN brew tap grpc/grpc
RUN brew install --with-plugins grpc
# Install Go1.6 from linuxbrew.
RUN brew install go
USER root
ENV GOPATH /go
ENV PATH $GOPATH/bin:/home/linuxbrew/.linuxbrew/opt/go/libexec/bin:$PATH
RUN mkdir -p "$GOPATH/src" "$GOPATH/bin" && chmod -R 777 "$GOPATH"
# Install packman
# TODO: consider installing released packages once artman is versioned (so that
# each release of artman is pegged to a release of packman)
RUN npm install -g https://github.com/googleapis/packman.git
# Setup tools for codegen of Ruby
RUN gem install rubocop --version '= 0.39.0' --no-ri --no-rdoc
RUN gem install bundler --version '= 1.12.1' --no-ri --no-rdoc
RUN gem install rake --version '= 10.5.0' --no-ri --no-rdoc
RUN gem install grpc-tools --version '=1.0.0' --no-ri --no-rdoc
# Install couple of git repos
WORKDIR /
RUN git clone https://github.com/googleapis/googleapis
RUN git clone https://github.com/googleapis/toolkit
ENV TOOLKIT_HOME /toolkit
WORKDIR /toolkit
RUN sudo ./gradlew install # Install toolkit. Must sudo to download gradle plugins.
# Install googleapis protocol compiler plugin which is needed to build gapic resource classes.
RUN pip install --upgrade pip
RUN pip install -e git+https://github.com/googleapis/proto-compiler-plugin#egg=remote
# Install artman.
# TODO(ethanbao): pipeline should be installed from package manager.
ADD . /src
WORKDIR /src
RUN pip install -r requirements.txt
# Start artman conductor.
CMD python start_conductor.py