forked from dependabot/dependabot-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
136 lines (107 loc) · 4.24 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
FROM ubuntu:18.04
### SYSTEM DEPENDENCIES
# Everything from `make` onwards in apt-get install is only installed to ensure
# Python support works with all packages (which may require specific libraries
# at install time).
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update \
&& apt-get upgrade -y \
&& apt-get install -y --no-install-recommends \
build-essential \
dirmngr \
git \
gnupg2 \
curl \
wget \
zlib1g-dev \
liblzma-dev \
tzdata \
zip \
unzip \
locales \
openssh-client \
make \
libpq-dev \
libssl-dev \
libbz2-dev \
libffi-dev \
libreadline-dev \
libsqlite3-dev \
libcurl4-openssl-dev \
llvm \
libncurses5-dev \
libncursesw5-dev \
libmysqlclient-dev \
xz-utils \
tk-dev \
&& locale-gen en_US.UTF-8
ENV LC_ALL=en_US.UTF-8 \
LANG=en_US.UTF-8
### RUBY
# Install Ruby 2.5, update RubyGems, and install Bundler
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys C3173AA6 \
&& echo "deb http://ppa.launchpad.net/brightbox/ruby-ng/ubuntu bionic main" > /etc/apt/sources.list.d/brightbox.list \
&& apt-get update \
&& apt-get install -y ruby2.5 ruby2.5-dev \
&& gem update --system 2.7.7 \
&& gem install --no-ri --no-rdoc bundler -v 1.17.1
### PYTHON
# Install Python 2.7 and 3.6 with pyenv. Using pyenv lets us support multiple Pythons
ENV PYENV_ROOT=/usr/local/.pyenv \
PATH="/usr/local/.pyenv/bin:$PATH"
RUN git clone https://github.com/pyenv/pyenv.git /usr/local/.pyenv \
&& cd /usr/local/.pyenv && git checkout v1.2.8 && cd - \
&& pyenv install 3.6.7 \
&& pyenv install 2.7.15 \
&& pyenv global 3.6.7
### JAVASCRIPT
# Install Node 10.0 and Yarn
RUN curl -sL https://deb.nodesource.com/setup_10.x | bash - \
&& apt-get install -y nodejs \
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \
&& apt-get update && apt-get install -y yarn
### ELM
# Install Elm 0.18 and Elm 0.19
ENV PATH="$PATH:/node_modules/.bin"
RUN npm install elm@0.18.0 \
&& wget "https://github.com/elm/compiler/releases/download/0.19.0/binaries-for-linux.tar.gz" \
&& tar xzf binaries-for-linux.tar.gz \
&& mv elm /usr/local/bin/elm19 \
&& rm -f binaries-for-linux.tar.gz
### PHP
# Install PHP 7.2 and Composer
RUN echo "deb http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" >> /etc/apt/sources.list.d/ondrej-php.list \
&& echo "deb-src http://ppa.launchpad.net/ondrej/php/ubuntu bionic main" >> /etc/apt/sources.list.d/ondrej-php.list \
&& apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 4F4EA0AAE5267A6C \
&& apt-get update \
&& apt-get install -y php7.2 php7.2-xml php7.2-json php7.2-zip php7.2-mbstring php7.2-intl php7.2-common php7.2-gettext php7.2-curl php-xdebug php7.2-bcmath php-gmp php7.2-imagick php7.2-gd php7.2-redis php7.2-soap php7.2-ldap \
&& curl -sS https://getcomposer.org/installer | php \
&& mv composer.phar /usr/local/bin/composer
### GO
# Install Go and dep
RUN curl https://dl.google.com/go/go1.11.2.linux-amd64.tar.gz | tar -xz -C /opt \
&& wget -O /opt/go/bin/dep https://github.com/golang/dep/releases/download/v0.5.0/dep-linux-amd64 \
&& chmod +x /opt/go/bin/dep \
&& mkdir /opt/go/gopath
ENV PATH=/opt/go/bin:$PATH GOPATH=/opt/go/gopath
### ELIXIR
# Install Erlang, Elixir and Hex
ENV PATH="$PATH:/usr/local/elixir/bin"
RUN wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb \
&& dpkg -i erlang-solutions_1.0_all.deb \
&& apt-get update \
&& apt-get install -y esl-erlang \
&& wget https://github.com/elixir-lang/elixir/releases/download/v1.7.4/Precompiled.zip \
&& unzip -d /usr/local/elixir -x Precompiled.zip \
&& rm -f Precompiled.zip \
&& mix local.hex --force
### RUST
# Install Rust 1.30.1
ENV RUSTUP_HOME=/opt/rust \
PATH="${PATH}:/opt/rust/bin"
RUN export CARGO_HOME=/opt/rust ; curl https://sh.rustup.rs -sSf | sh -s -- -y
### TERRAFORM
COPY terraform/helpers/build /tmp/terraform-build
RUN bash /tmp/terraform-build /opt/terraform
ENV PATH="$PATH:/opt/terraform/bin" DEPENDABOT_NATIVE_HELPERS_PATH="/opt"