-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile.debian
More file actions
27 lines (19 loc) · 893 Bytes
/
Copy pathDockerfile.debian
File metadata and controls
27 lines (19 loc) · 893 Bytes
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
# DOCKER_BUILDKIT=1 docker build . -t chen_x/clash
# DOCKER_BUILDKIT=1 docker build . --build-arg CN_MIRROR=1 -t chen_x/clash # if you are in China mainland
FROM debian
ARG CN_MIRROR=0
RUN if [ $CN_MIRROR = 1 ] ; then DEBIAN_VERSION=$(dpkg --status tzdata|grep Provides|cut -f2 -d'-') \
&& echo "using mirrors for $DEBIAN_VERSION" \
&& echo "deb http://mirrors.ustc.edu.cn/debian $DEBIAN_VERSION main non-free contrib" \
> /etc/apt/sources.list; else echo "No mirror"; fi
RUN apt-get update \
&& apt-get install -y curl openssl iptables
COPY _partial/entrypoint.sh /clash/
COPY _partial/download_clash.sh /clash/
ARG CLASH_VERSION=v0.19.0
RUN echo "Using clash ${CLASH_VERSION}" \
&& chmod +x /clash/entrypoint.sh \
&& chmod +x /clash/download_clash.sh \
&& /clash/download_clash.sh \
&& rm /clash/download_clash.sh
ENTRYPOINT ["/clash/entrypoint.sh"]