feature:TSG-23262:Support aarch64 arch.
This commit is contained in:
@@ -1,20 +1,19 @@
|
||||
# Start python3.6.9-alpine3.10 to build python:unitest
|
||||
FROM python:3.6.9-alpine3.10
|
||||
|
||||
FROM python:3.9-alpine
|
||||
|
||||
ADD dign_client /opt/dign_client
|
||||
|
||||
RUN sed -i s@/dl-cdn.alpinelinux.org/@/mirrors.ustc.edu.cn/@g /etc/apk/repositories \
|
||||
&& apk update \
|
||||
&& apk add curl-dev gcc libc-dev curl gzip libpcap-dev\
|
||||
&& pip3 install pycurl \
|
||||
&& pip3 install httpstat \
|
||||
&& pip3 install CIUnitTest \
|
||||
&& pip3 install pytelegraf \
|
||||
&& pip3 install dnspython \
|
||||
&& pip3 install prettytable \
|
||||
&& pip3 install pyyaml \
|
||||
&& pip3 install scapy \
|
||||
&& python3 -m pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple \
|
||||
&& python3 -m pip install pycurl \
|
||||
&& python3 -m pip install httpstat \
|
||||
&& python3 -m pip install CIUnitTest \
|
||||
&& python3 -m pip install pytelegraf \
|
||||
&& python3 -m pip install dnspython \
|
||||
&& python3 -m pip install prettytable \
|
||||
&& python3 -m pip install pyyaml \
|
||||
&& python3 -m pip install scapy \
|
||||
&& mv /opt/dign_client/etc/client.conf /opt/dign_client/etc/client.conf.sample
|
||||
|
||||
WORKDIR /opt/dign_client
|
||||
|
||||
@@ -18,7 +18,7 @@ import dns.resolver
|
||||
import sys
|
||||
import logging
|
||||
import copy
|
||||
from prettytable import PrettyTable,NONE,HEADER
|
||||
from prettytable import PrettyTable,VRuleStyle
|
||||
import yaml
|
||||
from urllib.parse import urlparse
|
||||
|
||||
@@ -422,7 +422,7 @@ class DNSQueryBuilder:
|
||||
def _query(self, record_type):
|
||||
try:
|
||||
self._setup()
|
||||
self._dns_answer = self._dns_resolver.query(self._domain, record_type)
|
||||
self._dns_answer = self._dns_resolver.resolve(self._domain, record_type)
|
||||
except Exception as error_info:
|
||||
self._error_info = error_info
|
||||
|
||||
@@ -1261,7 +1261,7 @@ class ResultExportBuilder:
|
||||
|
||||
def _create_exporter(self):
|
||||
self._exporter = PrettyTable()
|
||||
self._exporter.vrules = NONE
|
||||
self._exporter.vrules = VRuleStyle.NONE
|
||||
self._exporter.field_names = [self.COLUMN_0, self.COLUMN_1, self.COLUMN_2]
|
||||
self._exporter.align[self.COLUMN_0] = "l"
|
||||
self._exporter.align[self.COLUMN_1] = "l"
|
||||
|
||||
@@ -1,19 +1,29 @@
|
||||
FROM alpine
|
||||
RUN set -eux && sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories
|
||||
LABEL maintainer="TSG"
|
||||
ADD webproc_linux_amd64.gz /tmp/
|
||||
|
||||
COPY webproc_0.4.0_linux_amd64.gz /tmp/
|
||||
COPY webproc_0.4.0_linux_arm64.gz /tmp/
|
||||
# fetch dnsmasq and webproc binary
|
||||
RUN apk update \
|
||||
&& apk upgrade alpine-keys \
|
||||
&& apk --no-cache add dnsmasq \
|
||||
&& apk add --no-cache --virtual .build-deps curl \
|
||||
&& gzip -cd /tmp/webproc_linux_amd64.gz > /usr/local/bin/webproc \
|
||||
&& rm /tmp/webproc_linux_amd64.gz \
|
||||
&& chmod +x /usr/local/bin/webproc \
|
||||
&& apk del .build-deps
|
||||
|
||||
RUN ARCH=$(uname -m) && \
|
||||
if [ "$ARCH" = "x86_64" ]; then \
|
||||
gzip -cd /tmp/webproc_0.4.0_linux_amd64.gz > /usr/local/bin/webproc; \
|
||||
elif [ "$ARCH" = "aarch64" ]; then \
|
||||
gzip -cd /tmp/webproc_0.4.0_linux_arm64.gz > /usr/local/bin/webproc; \
|
||||
fi \
|
||||
&& chmod +x /usr/local/bin/webproc \
|
||||
&& rm -rf /tmp/webproc_0.4.0_linux_amd64.gz \
|
||||
&& rm -rf /tmp/webproc_0.4.0_linux_arm64.gz
|
||||
|
||||
#configure dnsmasq
|
||||
RUN mkdir -p /etc/default/
|
||||
RUN echo -e "ENABLED=1\nIGNORE_RESOLVCONF=yes" > /etc/default/dnsmasq
|
||||
COPY dnsmasq.conf /etc/dnsmasq.conf
|
||||
#run!
|
||||
ENTRYPOINT ["webproc","--config","/etc/dnsmasq.conf","--","dnsmasq","--no-daemon"]
|
||||
ENTRYPOINT ["webproc","-c","/etc/dnsmasq.conf","--","dnsmasq","--no-daemon"]
|
||||
|
||||
BIN
images_build/server_dns/webproc_0.4.0_linux_amd64.gz
Normal file
BIN
images_build/server_dns/webproc_0.4.0_linux_amd64.gz
Normal file
Binary file not shown.
BIN
images_build/server_dns/webproc_0.4.0_linux_arm64.gz
Normal file
BIN
images_build/server_dns/webproc_0.4.0_linux_arm64.gz
Normal file
Binary file not shown.
Binary file not shown.
@@ -14,15 +14,17 @@ RUN sed -i s@/archive.ubuntu.com/@/mirrors.tuna.tsinghua.edu.cn/@g /etc/apt/sour
|
||||
libffi-dev \
|
||||
make \
|
||||
nginx \
|
||||
ruby2.6 \
|
||||
ruby2.6-dev \
|
||||
ruby \
|
||||
ruby-dev \
|
||||
net-tools \
|
||||
iputils-ping \
|
||||
faketime \
|
||||
&& gem update --system 3.1.6 \
|
||||
&& gem install ffi --version 1.15.5 \
|
||||
&& gem install public_suffix --version 5.0.5 \
|
||||
&& gem install jekyll --version 4.2.2
|
||||
&& gem install public_suffix --version 4.0.7 \
|
||||
&& gem install rb-inotify --version 0.10.1 \
|
||||
&& gem install listen --version 3.5.0 \
|
||||
&& gem install jekyll --version 3.6.0
|
||||
|
||||
# Install badssl.com
|
||||
ADD . badssl.com
|
||||
|
||||
Reference in New Issue
Block a user