From 2149ea821ce498278bc04f428f7729cbf67cbf50 Mon Sep 17 00:00:00 2001 From: Dnomd343 Date: Fri, 25 Feb 2022 09:54:34 +0800 Subject: [PATCH] refactor: less layer in docker image --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index f9e1871..27397db 100644 --- a/Dockerfile +++ b/Dockerfile @@ -270,6 +270,7 @@ mv ./target/release/qtun-client /tmp/release/ && \ mv ./target/release/qtun-server /tmp/release/ FROM alpine:3.15 as asset +COPY . /tmp/asset/local/share/ProxyC COPY --from=build /tmp/release/ /tmp/release/ RUN apk add gcc python3 upx && \ mkdir -p /tmp/asset/bin/ && mkdir -p /tmp/asset/lib/ && \ @@ -289,7 +290,6 @@ mkdir -p /tmp/asset/lib/$PYTHON_DIR/ && \ mv /tmp/packages/ /tmp/asset/lib/$PYTHON_DIR/site-packages/ FROM alpine:3.15 -COPY . /usr/local/share/ProxyC COPY --from=asset /tmp/asset/ /usr/ RUN apk add --no-cache boost-program_options boost-system c-ares ca-certificates \ glib libev libsodium libstdc++ mbedtls pcre python3 redis udns && \ @@ -305,4 +305,4 @@ ln -s $PKG_DIR/ss-python-legacy/server.py /usr/bin/ss-python-legacy-server && \ ln -s /usr/bin/python3 /usr/bin/python && \ cp /usr/local/share/ProxyC/docker/init.sh /usr/bin/ EXPOSE 43581 -CMD ["sh","/usr/bin/init.sh"] \ No newline at end of file +CMD ["sh","/usr/bin/init.sh"]