mirror of
https://github.com/shadowsocks/shadowsocks-libev.git
synced 2026-10-31 22:45:45 +00:00
Docker: optimize image size
This commit is contained in:
@@ -1,5 +1,7 @@
|
||||
# General
|
||||
.dockerignore
|
||||
.git
|
||||
.gitmodules
|
||||
.gitignore
|
||||
.github
|
||||
AUTHORS
|
||||
|
||||
@@ -13,22 +13,21 @@ ENV DNS_ADDR 8.8.8.8
|
||||
ENV DNS_ADDR_2 8.8.4.4
|
||||
ENV ARGS=
|
||||
|
||||
COPY . /tmp
|
||||
COPY . /tmp/repo
|
||||
|
||||
RUN set -ex && \
|
||||
apk add --no-cache --virtual .build-deps \
|
||||
git \
|
||||
autoconf \
|
||||
automake \
|
||||
libtool \
|
||||
build-base \
|
||||
c-ares-dev \
|
||||
libev-dev \
|
||||
linux-headers \
|
||||
libtool \
|
||||
libsodium-dev \
|
||||
linux-headers \
|
||||
mbedtls-dev \
|
||||
pcre-dev \
|
||||
c-ares-dev && \
|
||||
cd /tmp && \
|
||||
pcre-dev && \
|
||||
cd /tmp/repo && \
|
||||
./autogen.sh && \
|
||||
./configure --prefix=/usr --disable-documentation && \
|
||||
make install && \
|
||||
@@ -43,7 +42,7 @@ RUN set -ex && \
|
||||
rng-tools \
|
||||
$runDeps && \
|
||||
apk del .build-deps && \
|
||||
rm -rf /tmp/*
|
||||
rm -rf /tmp/repo
|
||||
|
||||
USER nobody
|
||||
|
||||
|
||||
Reference in New Issue
Block a user