|
@ -1,6 +1,6 @@ |
|
|
FROM alpine:3.15 as build |
|
|
FROM alpine:3.15 as build |
|
|
COPY . /tmp/ClearDNS |
|
|
COPY . /tmp/ClearDNS |
|
|
ENV UPX_VERSION="v3.96" |
|
|
ENV UPX_VERSION="3.96" |
|
|
ENV OVERTURE_VERSION="v1.8" |
|
|
ENV OVERTURE_VERSION="v1.8" |
|
|
ENV DNSPROXY_VERSION="v0.41.3" |
|
|
ENV DNSPROXY_VERSION="v0.41.3" |
|
|
ENV ADGUARD_VERSION="v0.107.5" |
|
|
ENV ADGUARD_VERSION="v0.107.5" |
|
@ -8,33 +8,33 @@ RUN \ |
|
|
apk add git build-base bash make cmake glib-dev go npm nodejs yarn perl ucl-dev zlib-dev && \ |
|
|
apk add git build-base bash make cmake glib-dev go npm nodejs yarn perl ucl-dev zlib-dev && \ |
|
|
\ |
|
|
\ |
|
|
mkdir /tmp/release/ && cd /tmp/ && \ |
|
|
mkdir /tmp/release/ && cd /tmp/ && \ |
|
|
git clone https://github.com/upx/upx.git && \ |
|
|
|
|
|
git clone https://github.com/shawn1m/overture.git && \ |
|
|
git clone https://github.com/shawn1m/overture.git && \ |
|
|
git clone https://github.com/AdguardTeam/dnsproxy.git && \ |
|
|
git clone https://github.com/AdguardTeam/dnsproxy.git && \ |
|
|
git clone https://github.com/AdguardTeam/AdGuardHome.git && \ |
|
|
git clone https://github.com/AdguardTeam/AdGuardHome.git && \ |
|
|
|
|
|
wget https://github.com/upx/upx/releases/download/v${UPX_VERSION}/upx-${UPX_VERSION}-src.tar.xz && \ |
|
|
\ |
|
|
\ |
|
|
cd /tmp/upx/ && git checkout $UPX_VERSION && \ |
|
|
cd /tmp/ && tar xf upx-${UPX_VERSION}-src.tar.xz && \ |
|
|
git submodule update --init --recursive && \ |
|
|
cd upx-${UPX_VERSION}-src && make all && \ |
|
|
make all && mv ./src/upx.out /usr/bin/upx && \ |
|
|
mv ./src/upx.out /usr/bin/upx && \ |
|
|
\ |
|
|
\ |
|
|
cd /tmp/ClearDNS/ && mkdir ./build/ && \ |
|
|
cd /tmp/ClearDNS/ && mkdir ./build/ && \ |
|
|
cd ./build/ && cmake -DCMAKE_BUILD_TYPE=Release .. && make && \ |
|
|
cd ./build/ && cmake -DCMAKE_BUILD_TYPE=Release .. && make && \ |
|
|
mv ../bin/cleardns /tmp/release/ && \ |
|
|
mv ../bin/cleardns /tmp/release/ && \ |
|
|
\ |
|
|
\ |
|
|
cd /tmp/overture/ && git checkout $OVERTURE_VERSION && \ |
|
|
cd /tmp/overture/ && git checkout ${OVERTURE_VERSION} && \ |
|
|
env CGO_ENABLED=0 go build -o overture -trimpath -ldflags "-X main.version=$OVERTURE_VERSION -s -w" ./main/main.go && \ |
|
|
env CGO_ENABLED=0 go build -o overture -trimpath -ldflags "-X main.version=${OVERTURE_VERSION} -s -w" ./main/main.go && \ |
|
|
mv ./overture /tmp/release/ && \ |
|
|
mv ./overture /tmp/release/ && \ |
|
|
\ |
|
|
\ |
|
|
cd /tmp/dnsproxy/ && git checkout $DNSPROXY_VERSION && \ |
|
|
cd /tmp/dnsproxy/ && git checkout ${DNSPROXY_VERSION} && \ |
|
|
env CGO_ENABLED=0 go build -trimpath -ldflags "-X main.VersionString=$DNSPROXY_VERSION -s -w" && \ |
|
|
env CGO_ENABLED=0 go build -trimpath -ldflags "-X main.VersionString=${DNSPROXY_VERSION} -s -w" && \ |
|
|
mv ./dnsproxy /tmp/release/ && \ |
|
|
mv ./dnsproxy /tmp/release/ && \ |
|
|
\ |
|
|
\ |
|
|
cd /tmp/AdGuardHome/ && git checkout $ADGUARD_VERSION && \ |
|
|
cd /tmp/AdGuardHome/ && git checkout ${ADGUARD_VERSION} && \ |
|
|
make VERSION=$ADGUARD_VERSION && \ |
|
|
make CHANNEL="release" VERSION=${ADGUARD_VERSION} && \ |
|
|
mv ./AdGuardHome /tmp/release/ && \ |
|
|
mv ./AdGuardHome /tmp/release/ && \ |
|
|
\ |
|
|
\ |
|
|
cd /tmp/release/ && \ |
|
|
cd /tmp/release/ && strip cleardns && \ |
|
|
strip * && upx -9 * |
|
|
upx -9 AdGuardHome && upx -9 dnsproxy && upx -9 overture |
|
|
|
|
|
|
|
|
FROM alpine:3.15 as asset |
|
|
FROM alpine:3.15 as asset |
|
|
COPY . /tmp/ClearDNS |
|
|
COPY . /tmp/ClearDNS |
|
|