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 5
5
RUN go build -o /tracetrout -ldflags='-s -w'
6
6
7
7
FROM 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}
9
10
WORKDIR /tracetrout
10
11
COPY entrypoint.sh .
11
12
COPY --from=builder /tracetrout .
Original file line number Diff line number Diff line change @@ -10,14 +10,18 @@ jobs:
10
10
- setup_remote_docker :
11
11
version : 17.06.0-ce
12
12
- run : docker build -t ${DOCKER_HUB_IMAGE} .
13
+ - run : docker build --build-arg IPV6_SUPPORT=1 -t ${DOCKER_HUB_IMAGE}:ipv6 .
13
14
- deploy :
14
15
name : Deploy the image to Docker Hub
15
16
command : |
16
17
if echo -n "${CIRCLE_TAG}" | grep -Eq ^v[0-9]+\.[0-9]+\.[0-9]+$; then
17
18
docker tag ${DOCKER_HUB_IMAGE} ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}
19
+ docker tag ${DOCKER_HUB_IMAGE}:ipv6 ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}-ipv6
18
20
docker login -u ${DOCKER_HUB_USER} -p ${DOCKER_HUB_PASS}
19
21
docker push ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}
20
22
docker push ${DOCKER_HUB_IMAGE}
23
+ docker push ${DOCKER_HUB_IMAGE}:${CIRCLE_TAG}-ipv6
24
+ docker push ${DOCKER_HUB_IMAGE}:ipv6
21
25
fi
22
26
23
27
deployment :
Original file line number Diff line number Diff line change 1
1
set -e
2
2
3
3
for CMD in iptables ip6tables; do
4
+ command -v ${CMD} > /dev/null 2>&1 || continue
5
+
4
6
" ${CMD} " -A INPUT -t mangle -j CONNMARK --restore-mark
5
7
" ${CMD} " -A INPUT -t mangle -m mark ! --mark 0 -j ACCEPT
6
8
" ${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