-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
31 lines (18 loc) · 847 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
FROM golang:1.17-bullseye as builder
COPY . /bridgetest/
ENV CGO_ENABLED=0
#install snowflake
RUN git clone https://gitlab.torproject.org/tpo/anti-censorship/pluggable-transports/snowflake.git \
&& cd snowflake/client && go get -d && go build -ldflags="-s -w" && mv client /usr/bin/snowflake
RUN cd /bridgetest/stun-test && go get -d && go build -ldflags="-s -w" -o stun-test
FROM debian:bullseye-slim
#install python
RUN apt-get update && apt-get install -y wget tcpdump \
python3 python3-stem tor obfs4proxy python2&& apt-get clean
COPY --from=builder /usr/bin/snowflake /usr/bin/snowflake
COPY --from=builder /bridgetest/ /bridgetest/
RUN crontab /bridgetest/docker/probe-crontab
COPY ./docker/entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh
RUN ln /usr/bin/tcpdump /usr/sbin/tcpdump
ENTRYPOINT ["/entrypoint.sh"]