-
Notifications
You must be signed in to change notification settings - Fork 2
/
Dockerfile.centos
51 lines (43 loc) · 1.53 KB
/
Dockerfile.centos
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
FROM centos:6
RUN yum -y update && \
yum clean all && \
yum install -y \
perl perl-core \
libtool \
zlib-devel \
curl \
openssl \
openssl-devel \
openssl-static \
java-1.8.0-openjdk \
java-1.8.0-openjdk-devel && \
yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-6.noarch.rpm && \
yum install -y clang
ENV JAVA_HOME /usr/lib/jvm/java-1.8.0-openjdk.x86_64/
ENV PATH=/root/.cargo/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
RUN echo "Building OpenSSL" && \
cd /tmp && \
OPENSSL_VERSION=1.0.2o && \
curl -LO "https://www.openssl.org/source/openssl-$OPENSSL_VERSION.tar.gz" && \
tar xvzf "openssl-$OPENSSL_VERSION.tar.gz" && cd "openssl-$OPENSSL_VERSION" && \
./Configure no-shared no-zlib -fPIC --prefix=/usr/local linux-x86_64 && \
make depend && \
make && make install && \
\
echo "Building zlib" && \
cd /tmp && \
ZLIB_VERSION=1.2.11 && \
curl -LO "http://zlib.net/zlib-$ZLIB_VERSION.tar.gz" && \
tar xzf "zlib-$ZLIB_VERSION.tar.gz" && cd "zlib-$ZLIB_VERSION" && \
./configure --static --prefix=/usr/local && \
make && make install
ENV OPENSSL_DIR=/usr/local \
OPENSSL_LIB_DIR=/usr/local/lib64 \
OPENSSL_INCLUDE_DIR=/usr/local/include \
DEP_OPENSSL_INCLUDE=/usr/local/include \
OPENSSL_STATIC=1 \
LIBZ_SYS_STATIC=1
RUN curl https://sh.rustup.rs -sSf | \
sh -s -- --default-toolchain stable -y
ADD . ./
CMD cargo build --release --target x86_64-unknown-linux-gnu