This repository was archived by the owner on Nov 10, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Expand file tree Collapse file tree 3 files changed +8
-1
lines changed Original file line number Diff line number Diff line change 55RUN go build -o /tracetrout -ldflags='-s -w'
66
77FROM alpine:3.7
8- RUN apk add --no-cache iptables ip6tables libnetfilter_queue
8+ ARG IPV6_SUPPORT
9+ RUN apk add --no-cache iptables libnetfilter_queue ${IPV6_SUPPORT:+ip6tables}
910WORKDIR /tracetrout
1011COPY entrypoint.sh .
1112COPY --from=builder /tracetrout .
Original file line number Diff line number Diff line change @@ -10,14 +10,18 @@ jobs:
1010 - setup_remote_docker :
1111 version : 17.06.0-ce
1212 - run : docker build -t ${DOCKER_HUB_IMAGE} .
13+ - run : docker build --build-arg IPV6_SUPPORT=1 -t ${DOCKER_HUB_IMAGE}:ipv6 .
1314 - deploy :
1415 name : Deploy the image to Docker Hub
1516 command : |
1617 if echo -n "${CIRCLE_TAG}" | grep -Eq ^v[0-9]+\.[0-9]+\.[0-9]+$; then
1718 docker tag ${DOCKER_HUB_IMAGE} ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}
19+ docker tag ${DOCKER_HUB_IMAGE}:ipv6 ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}-ipv6
1820 docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_PASS}
1921 docker push ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}
2022 docker push ${DOCKER_HUB_IMAGE}
23+ docker push ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}-ipv6
24+ docker push ${DOCKER_HUB_IMAGE}:ipv6
2125 fi
2226
2327deployment :
Original file line number Diff line number Diff line change 11set -e
22
33for CMD in iptables ip6tables; do
4+ command -v ${CMD} > /dev/null 2>&1 || continue
5+
46 " ${CMD} " -A INPUT -t mangle -j CONNMARK --restore-mark
57 " ${CMD} " -A INPUT -t mangle -m mark ! --mark 0 -j ACCEPT
68 " ${CMD} " -A INPUT -t mangle -p tcp --dport " ${PORT} " -j MARK --set-mark 0x10000
You can’t perform that action at this time.
0 commit comments