Created
June 30, 2018 12:41
-
-
Save asjustas/8db237fc745120aa7e8f522769aa263a to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM php:7.0.3 | |
RUN mkdir /worker | |
WORKDIR /worker | |
RUN apt-get update && \ | |
apt-get install -y git | |
RUN curl -O http://zlib.net/zlib-1.2.11.tar.gz && \ | |
tar -xvzf /worker/zlib-1.2.11.tar.gz && \ | |
cd /worker/zlib-1.2.11/ && \ | |
env CFLAGS="-O3 -fPIC" LDFLAGS="-static" ./configure --prefix=/opt/zlib --static && \ | |
make -j 4 && \ | |
make install && \ | |
rm -rf /root/zlib.tar.xz /root/zlib | |
RUN curl -O https://www.openssl.org/source/openssl-1.0.2o.tar.gz \ | |
&& tar -xvzf /worker/openssl-1.0.2o.tar.gz \ | |
&& ls -la \ | |
&& cd /worker/openssl-1.0.2o/ \ | |
&& ./Configure linux-generic32 --prefix=/usr/local -fPIC no-gost no-shared --with-zlib-include=/opt/zlib/include --with-zlib-lib=/opt/zlib/lib \ | |
&& make \ | |
&& make install \ | |
&& rm /worker/openssl-1.0.2o.tar.gz | |
#&& rm -r /worker/openssl-1.0.2o | |
RUN curl -O https://ftp.gnu.org/gnu/libidn/libidn2-2.0.5.tar.gz && \ | |
tar -xvzf /worker/libidn2-2.0.5.tar.gz && \ | |
cd /worker/libidn2-2.0.5/ && \ | |
./configure \ | |
--prefix=/opt/libidn2 \ | |
--enable-static \ | |
--disable-shared \ | |
--with-pic && \ | |
make -j 4 && \ | |
make install | |
#RUN curl -O https://www.libssh2.org/download/libssh2-1.8.0.tar.gz && \ | |
# tar -xvzf libssh2-1.8.0.tar.gz && \ | |
# cd /worker/libssh2-1.8.0 && \ | |
# ./configure LIBS=-ldl && \ | |
# make && \ | |
# make install | |
RUN curl -O https://curl.haxx.se/download/curl-7.60.0.tar.gz && \ | |
tar -xvzf /worker/curl-7.60.0.tar.gz && \ | |
cd /worker/curl-7.60.0 && \ | |
LIBS="-ldl -dl" ./configure \ | |
--disable-shared \ | |
--with-zlib=/opt/zlib \ | |
--with-ssl=/worker/openssl-1.0.2o \ | |
--with-libidn2=/opt/libidn2 && \ | |
#--with-libssh2=/worker/libssh2-1.8.0 && \ | |
make curl_LDFLAGS="-all-static" -j 4 && \ | |
make curl_LDFLAGS="-all-static" install && \ | |
rm /worker/curl-7.60.0.tar.gz |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment