forked from Leoyzen/docker-smartdns
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
31 lines (26 loc) · 959 Bytes
/
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
FROM lsiobase/alpine:3.8
# set version label
ARG BUILD_DATE
ARG VERSION
LABEL build_version="leoyzen.vip version:- ${VERSION} Build-date:- ${BUILD_DATE}"
LABEL maintainer="Leoyzen"
ENV TZ=Asia/Shanghai SMARTDNS_VERSION=latest
RUN \
echo "**** install packages ****" \
&& cd /tmp \
&& sed -i '[email protected]@mirrors.aliyun.com@g' /etc/apk/repositories \
&& apk add --no-cache openssl jq libc6-compat curl \
&& archive=$(curl -fSL https://api.github.com/repos/pymumu/smartdns/releases/${SMARTDNS_VERSION}|jq -r '.assets[]|select(.name|endswith("x86_64-linux-all.tar.gz"))|.browser_download_url') \
&& curl -fSL ${archive} -o smartdns.tar.gz \
&& tar zxf smartdns.tar.gz \
&& cd smartdns \
&& mkdir /default/ \
&& mv etc/smartdns/smartdns.conf /default/ \
&& mv usr/sbin/smartdns /usr/bin/ \
&& apk del jq \
&& rm -rf /tmp
# copy local files
COPY root/ /
# ports and volumes
EXPOSE 53:53/udp
VOLUME /config