-
Notifications
You must be signed in to change notification settings - Fork 258
/
Dockerfile
37 lines (32 loc) · 1.28 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
FROM php:7.2.13-cli-alpine
ENV SMProxy_VERSION 1.3.1
RUN apk add --no-cache --virtual .phpize-deps $PHPIZE_DEPS linux-headers \
&& pecl install swoole \
&& docker-php-ext-enable swoole \
\
# xBring in gettext so we can get `envsubst`, then throw
# the rest away. To do this, we need to install `gettext`
# then move `envsubst` out of the way so `gettext` can
# be deleted completely, then move `envsubst` back.
&& apk add --no-cache --virtual .gettext gettext \
&& mv /usr/bin/envsubst /tmp/ \
\
&& runDeps="$( \
scanelf --needed --nobanner --format '%n#p' /usr/local/bin/php /usr/local/lib/php/extensions/*/*.so /tmp/envsubst \
| tr ',' '\n' \
| sort -u \
| awk 'system("[ -e /usr/local/lib/" $1 " ]") == 0 { next } { print "so:" $1 }' \
)" \
&& apk add --no-cache --virtual .php-rundeps $runDeps \
&& apk del .phpize-deps \
&& apk del .gettext \
&& mv /tmp/envsubst /usr/local/bin/ \
\
&& cd /usr/local \
&& wget https://github.com/louislivi/smproxy/releases/download/v$SMProxy_VERSION/smproxy.tar.gz \
&& tar -zxvf smproxy.tar.gz \
&& ls -lna
VOLUME /usr/local/smproxy/conf
VOLUME /usr/local/smproxy/logs
EXPOSE 3366
CMD ["/usr/local/smproxy/SMProxy", "start", "--console"]