forked from m2nx/ubnt-mips-shadowsocks-libev
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
70 lines (60 loc) · 2.01 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
From buildpack-deps:xenial-scm
LABEL maintainer="MMX <[email protected]>"
WORKDIR /usr/local/ss/
# netease source
#COPY sources.list /etc/apt/sources.list
VOLUME /usr/local/ss/
COPY . /usr/local/ss/
RUN apt update && apt install -y \
wget \
curl \
git \
autoconf \
automake \
g++-mipsel-linux-gnu \
gcc-mipsel-linux-gnu \
gettext build-essential \
libtool \
gettext
# mbedtls
RUN mbedtls_ver=2.12.0 \
&& wget --no-check-certificate https://tls.mbed.org/download/mbedtls-$mbedtls_ver-gpl.tgz \
&& tar xvf mbedtls-$mbedtls_ver-gpl.tgz \
&& cd mbedtls-$mbedtls_ver \
&& sed -i "s/DESTDIR=\/usr\/local/DESTDIR=\/usr\/local\/mbedtls/g" Makefile \
&& CC=mipsel-linux-gnu-gcc AR=mipsel-linux-gnu-ar LD=mipsel-linux-gnu-ld LDFLAGS=-static make \
&& make install
# pcre
RUN pcre_ver=8.42 \
&& wget https://ftp.pcre.org/pub/pcre/pcre-$pcre_ver.tar.gz \
&& tar xvf pcre-$pcre_ver.tar.gz \
&& cd pcre-$pcre_ver \
&& ./configure --host=mipsel-linux-gnu --prefix=/usr/local/pcre --disable-shared --enable-utf8 --enable-unicode-properties \
&& make \
&& make install
# libsodium
RUN git clone https://github.com/jedisct1/libsodium \
&& cd libsodium/ \
&& git checkout stable \
&& ./autogen.sh \
&& ./configure --host=mipsel-linux-gnu --prefix=/usr/local/libsodium --disable-ssp --disable-shared \
&& make && make install
# libev
RUN libev_ver=4.33 \
&& wget http://dist.schmorp.de/libev/libev-$libev_ver.tar.gz \
&& tar xvf libev-$libev_ver.tar.gz \
&& cd libev-$libev_ver \
&& ./configure --host=mipsel-linux-gnu --prefix=/usr/local/libev --disable-shared \
&& make \
&& make install
# c-ares
RUN cares_ver=1.14.0 \
&& wget https://c-ares.haxx.se/download/c-ares-$cares_ver.tar.gz \
&& tar xvf c-ares-$cares_ver.tar.gz \
&& cd c-ares-$cares_ver \
&& ./configure --host=mipsel-linux-gnu --prefix=/usr/local/libcares --disable-shared --enable-utf8 --enable-unicode-properties \
&& make \
&& make install
# shadowsocks-libev
RUN chmod +x /usr/local/ss/entrypoint.sh
ENTRYPOINT ["/usr/local/ss/entrypoint.sh"]