-
Notifications
You must be signed in to change notification settings - Fork 58
/
Copy pathDockerfile
156 lines (129 loc) · 5.21 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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
FROM ubuntu:bionic
ENV DEBIAN_FRONTEND=noninteractive
# Install common packages
RUN apt-get update && \
apt-get install -yq --no-install-recommends \
apt-transport-https \
build-essential \
ca-certificates \
curl \
gnupg2 \
locales \
software-properties-common \
tzdata \
unzip \
wget \
git
# Set the locale and timezone
RUN locale-gen en_US.UTF-8 && \
ln -fs /usr/share/zoneinfo/America/New_York /etc/localtime && \
dpkg-reconfigure --frontend noninteractive tzdata
ENV LANG en_US.UTF-8
ENV LANGUAGE en_US:en
ENV LC_ALL en_US.UTF-8
## C
# PCRE is installed with PHP 8
#RUN apt-get install -yq --no-install-recommends \
# libpcre2-dev
## Crystal
RUN curl -sSL https://dist.crystal-lang.org/apt/setup.sh | bash && \
apt-get install -yq --no-install-recommends \
crystal
## C++
RUN apt-get install -yq --no-install-recommends \
libboost-regex-dev && \
wget -q http://www.akenotsuki.com/misc/srell/srell-latest -O srell.zip && \
mkdir -p /tmp/srell && \
unzip srell.zip -d /tmp/srell && \
cp -p -u /tmp/srell/single-header/srell.hpp /usr/local/include
## C# Mono
RUN apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF && \
echo "deb https://download.mono-project.com/repo/ubuntu stable-bionic main" | tee /etc/apt/sources.list.d/mono-official-stable.list && \
apt-get update && \
apt-get install -yq --no-install-recommends \
mono-devel
## C# .Net Core
RUN wget -q https://packages.microsoft.com/config/ubuntu/18.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb && \
dpkg -i packages-microsoft-prod.deb && \
apt-get update && \
apt-get install -yq --no-install-recommends \
dotnet-sdk-5.0
## D - DMD
RUN wget -q http://downloads.dlang.org/releases/2.x/2.089.0/dmd_2.089.0-0_amd64.deb -O dmd_2.089.0-0_amd64.deb && \
dpkg -i --ignore-depends=libcurl3 dmd_2.089.0-0_amd64.deb
## D - LDC
RUN apt-get install -yq --no-install-recommends \
ldc
## Dart
RUN sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -' && \
sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list' && \
apt-get update && \
apt-get install -yq --no-install-recommends \
dart && \
ln -s /usr/lib/dart/bin/dart2native /usr/local/bin/dart2native
## Go
RUN add-apt-repository ppa:longsleep/golang-backports && \
apt-get update && \
apt-get install -yq --no-install-recommends \
golang-go
## Java - Open
RUN apt-get install -yq --no-install-recommends \
openjdk-11-jre \
openjdk-11-jdk
## Javascript - Node
RUN curl -sL https://deb.nodesource.com/setup_15.x | bash - && \
apt-get install -yq --no-install-recommends \
nodejs
## Julia
RUN wget -q https://julialang-s3.julialang.org/bin/linux/x64/1.6/julia-1.6.0-linux-x86_64.tar.gz -O julia-1.6.0-linux-x86_64.tar.gz && \
tar -x -C /opt -f julia-1.6.0-linux-x86_64.tar.gz && \
mv /opt/julia-1.6.0 /opt/julia && \
ln -s /opt/julia/bin/julia /usr/local/bin/julia
## Kotlin
RUN wget -q https://github.com/JetBrains/kotlin/releases/download/v1.4.32/kotlin-compiler-1.4.32.zip -O kotlin-compiler-1.4.32.zip && \
unzip kotlin-compiler-1.4.32.zip -d /opt/ && \
echo 'export PATH=$PATH:/opt/kotlinc/bin' >> ~/.bashrc && \
ln -s /opt/kotlinc/bin/kotlin /usr/local/bin/kotlin && \
ln -s /opt/kotlinc/bin/kotlinc /usr/local/bin/kotlinc
## Nim
RUN curl https://nim-lang.org/choosenim/init.sh -sSf | sh -s -- -y && \
ln -s /root/.nimble/bin/nim /usr/local/bin/nim && \
/root/.nimble/bin/nimble install regex -y
## PHP
RUN add-apt-repository ppa:ondrej/php --yes && \
apt-get update && \
apt-get install -yq --no-install-recommends \
libpcre2-dev \
php8.0-cli
## Python 2
RUN apt-get install -yq --no-install-recommends \
python2.7
## Python 3
RUN apt-get install -yq --no-install-recommends \
python3.6
## Pyhton2 - PyPy2
RUN wget -q https://downloads.python.org/pypy/pypy2.7-v7.3.3-linux64.tar.bz2 -O pypy2.7-v7.3.3-linux64.tar.bz2 && \
tar -x -C /opt -f pypy2.7-v7.3.3-linux64.tar.bz2 && \
mv /opt/pypy2.7-v7.3.3-linux64 /opt/pypy2 && \
ln -s /opt/pypy2/bin/pypy /usr/local/bin/pypy2 && \
rm pypy2.7-v7.3.3-linux64.tar.bz2
## Pyhton3 - PyPy3
RUN wget -q https://downloads.python.org/pypy/pypy3.6-v7.3.3-linux64.tar.bz2 -O pypy3.6-v7.3.3-linux64.tar.bz2 && \
tar -x -C /opt -f pypy3.6-v7.3.3-linux64.tar.bz2 && \
mv /opt/pypy3.6-v7.3.3-linux64 /opt/pypy3 && \
ln -s /opt/pypy3/bin/pypy3 /usr/local/bin/pypy3 && \
rm pypy3.6-v7.3.3-linux64.tar.bz2
## Ruby
RUN apt-get install -yq --no-install-recommends \
ruby-full
## Rust
RUN wget -q https://sh.rustup.rs -O rustup-init.sh && \
chmod +x rustup-init.sh && \
./rustup-init.sh -y && \
rm rustup-init.sh && \
echo 'export PATH=$HOME/.cargo/bin:$PATH' >> ~/.bashrc && \
ln -s /root/.cargo/bin/cargo /usr/local/bin/cargo
## Clean up
RUN apt-get clean && rm -rf /var/lib/apt/lists/*
WORKDIR /var/regex
CMD ["/usr/bin/php", "/var/regex/run-benchmarks.php"]