all: sync with master; upd chlog
This commit is contained in:
@@ -1,67 +0,0 @@
|
||||
# A docker file for scripts/make/build-docker.sh.
|
||||
|
||||
FROM alpine:3.17
|
||||
|
||||
ARG BUILD_DATE
|
||||
ARG VERSION
|
||||
ARG VCS_REF
|
||||
|
||||
LABEL\
|
||||
maintainer="AdGuard Team <devteam@adguard.com>" \
|
||||
org.opencontainers.image.authors="AdGuard Team <devteam@adguard.com>" \
|
||||
org.opencontainers.image.created=$BUILD_DATE \
|
||||
org.opencontainers.image.description="Network-wide ads & trackers blocking DNS server" \
|
||||
org.opencontainers.image.documentation="https://github.com/AdguardTeam/AdGuardHome/wiki/" \
|
||||
org.opencontainers.image.licenses="GPL-3.0" \
|
||||
org.opencontainers.image.revision=$VCS_REF \
|
||||
org.opencontainers.image.source="https://github.com/AdguardTeam/AdGuardHome" \
|
||||
org.opencontainers.image.title="AdGuard Home" \
|
||||
org.opencontainers.image.url="https://adguard.com/en/adguard-home/overview.html" \
|
||||
org.opencontainers.image.vendor="AdGuard" \
|
||||
org.opencontainers.image.version=$VERSION
|
||||
|
||||
# Update certificates.
|
||||
RUN apk --no-cache add ca-certificates libcap tzdata && \
|
||||
mkdir -p /opt/adguardhome/conf /opt/adguardhome/work && \
|
||||
chown -R nobody: /opt/adguardhome
|
||||
|
||||
ARG DIST_DIR
|
||||
ARG TARGETARCH
|
||||
ARG TARGETOS
|
||||
ARG TARGETVARIANT
|
||||
|
||||
COPY --chown=nobody:nogroup\
|
||||
./${DIST_DIR}/docker/AdGuardHome_${TARGETOS}_${TARGETARCH}_${TARGETVARIANT}\
|
||||
/opt/adguardhome/AdGuardHome
|
||||
|
||||
RUN setcap 'cap_net_bind_service=+eip' /opt/adguardhome/AdGuardHome
|
||||
|
||||
# 53 : TCP, UDP : DNS
|
||||
# 67 : UDP : DHCP (server)
|
||||
# 68 : UDP : DHCP (client)
|
||||
# 80 : TCP : HTTP (main)
|
||||
# 443 : TCP, UDP : HTTPS, DNS-over-HTTPS (incl. HTTP/3), DNSCrypt (main)
|
||||
# 784 : UDP : DNS-over-QUIC (experimental)
|
||||
# 853 : TCP, UDP : DNS-over-TLS, DNS-over-QUIC
|
||||
# 3000 : TCP, UDP : HTTP(S) (alt, incl. HTTP/3)
|
||||
# 3001 : TCP, UDP : HTTP(S) (beta, incl. HTTP/3)
|
||||
# 5443 : TCP, UDP : DNSCrypt (alt)
|
||||
# 6060 : TCP : HTTP (pprof)
|
||||
# 8853 : UDP : DNS-over-QUIC (experimental)
|
||||
#
|
||||
# TODO(a.garipov): Remove the old, non-standard 784 and 8853 ports for
|
||||
# DNS-over-QUIC in a future release.
|
||||
EXPOSE 53/tcp 53/udp 67/udp 68/udp 80/tcp 443/tcp 443/udp 784/udp\
|
||||
853/tcp 853/udp 3000/tcp 3000/udp 3001/tcp 3001/udp 5443/tcp\
|
||||
5443/udp 6060/tcp 8853/udp
|
||||
|
||||
WORKDIR /opt/adguardhome/work
|
||||
|
||||
ENTRYPOINT ["/opt/adguardhome/AdGuardHome"]
|
||||
|
||||
CMD [ \
|
||||
"--no-check-update", \
|
||||
"-c", "/opt/adguardhome/conf/AdGuardHome.yaml", \
|
||||
"-h", "0.0.0.0", \
|
||||
"-w", "/opt/adguardhome/work" \
|
||||
]
|
||||
@@ -87,7 +87,7 @@ readonly docker_image_full_name docker_tags
|
||||
|
||||
# Copy the binaries into a new directory under new names, so that it's easier to
|
||||
# COPY them later. DO NOT remove the trailing underscores. See file
|
||||
# scripts/make/Dockerfile.
|
||||
# docker/Dockerfile.
|
||||
dist_docker="${dist_dir}/docker"
|
||||
readonly dist_docker
|
||||
|
||||
@@ -105,6 +105,18 @@ cp "${dist_dir}/AdGuardHome_linux_arm_7/AdGuardHome/AdGuardHome"\
|
||||
cp "${dist_dir}/AdGuardHome_linux_ppc64le/AdGuardHome/AdGuardHome"\
|
||||
"${dist_docker}/AdGuardHome_linux_ppc64le_"
|
||||
|
||||
# Copy the helper scripts. See file docker/Dockerfile.
|
||||
dist_docker_scripts="${dist_docker}/scripts"
|
||||
readonly dist_docker_scripts
|
||||
|
||||
mkdir -p "$dist_docker_scripts"
|
||||
cp "./docker/dns-bind.awk"\
|
||||
"${dist_docker_scripts}/dns-bind.awk"
|
||||
cp "./docker/web-bind.awk"\
|
||||
"${dist_docker_scripts}/web-bind.awk"
|
||||
cp "./docker/healthcheck.sh"\
|
||||
"${dist_docker_scripts}/healthcheck.sh"
|
||||
|
||||
# Don't use quotes with $docker_tags and $debug_flags because we want word
|
||||
# splitting and or an empty space if tags are empty.
|
||||
$sudo_cmd docker\
|
||||
@@ -118,5 +130,5 @@ $sudo_cmd docker\
|
||||
--platform "$docker_platforms"\
|
||||
$docker_tags\
|
||||
-t "$docker_image_full_name"\
|
||||
-f ./scripts/make/Dockerfile\
|
||||
-f ./docker/Dockerfile\
|
||||
.
|
||||
|
||||
@@ -160,10 +160,10 @@ run_linter "$GO" vet ./...
|
||||
run_linter govulncheck ./...
|
||||
|
||||
# Apply more lax standards to the code we haven't properly refactored yet.
|
||||
run_linter gocyclo --over 14 ./internal/querylog/
|
||||
run_linter gocyclo --over 13\
|
||||
./internal/dhcpd\
|
||||
./internal/home/\
|
||||
./internal/querylog/\
|
||||
;
|
||||
|
||||
# Apply the normal standards to new or somewhat refactored code.
|
||||
@@ -180,6 +180,7 @@ run_linter gocyclo --over 10\
|
||||
./internal/version/\
|
||||
./scripts/blocked-services/\
|
||||
./scripts/vetted-filters/\
|
||||
./scripts/translations/\
|
||||
./main.go\
|
||||
;
|
||||
|
||||
|
||||
@@ -27,6 +27,31 @@ set -f -u
|
||||
# Source the common helpers, including not_found.
|
||||
. ./scripts/make/helper.sh
|
||||
|
||||
git ls-files -- '*.md' '*.yaml' '*.yml' 'client/src/__locales/en.json'\
|
||||
# Simple analyzers
|
||||
|
||||
# trailing_newlines is a simple check that makes sure that all plain-text files
|
||||
# have a trailing newlines to make sure that all tools work correctly with them.
|
||||
#
|
||||
# TODO(a.garipov): Add to the standard skeleton project.
|
||||
trailing_newlines() {
|
||||
nl="$( printf "\n" )"
|
||||
readonly nl
|
||||
|
||||
git ls-files\
|
||||
':!*.png'\
|
||||
':!*.tar.gz'\
|
||||
':!*.zip'\
|
||||
| while read -r f
|
||||
do
|
||||
if [ "$( tail -c -1 "$f" )" != "$nl" ]
|
||||
then
|
||||
printf '%s: must have a trailing newline\n' "$f"
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
run_linter -e trailing_newlines
|
||||
|
||||
git ls-files -- '*.md' '*.txt' '*.yaml' '*.yml' 'client/src/__locales/en.json'\
|
||||
| xargs misspell --error\
|
||||
| sed -e 's/^/misspell: /'
|
||||
|
||||
Reference in New Issue
Block a user