Commit 68a8581f authored by Cecylia Bocovich's avatar Cecylia Bocovich
Browse files

Create probetest docker image

parent 4d9003c8
# First, you need to create a configuration file, ".env", in the same directory
# as this file, "docker-compose.yml". Add the following environment variables
# to this configuration file.
#SITENAME=unique id
version: "3.9"
network_mode: host
image: thetorproject/probetest:latest
container_name: probe
# Exit with an error message if OR_PORT is unset or empty.
- SITENAME=${SITENAME:?Env var SITENAME is not set.}
restart: unless-stopped
- .:/bridgetest/log
entrypoint: ["cron", "-f"]
FROM debian:buster-slim
#install python
RUN apt-get update && apt-get install -y git wget tcpdump \
python3 python3-stem tor obfs4proxy
#install Go
RUN wget && \
tar -C /usr/local -xzf go1.15.14.linux-amd64.tar.gz && \
rm go1.15.14.linux-amd64.tar.gz
ENV PATH=$PATH:/usr/local/go/bin
#install snowflake
RUN git clone \
&& cd snowflake/client && go get -d && go build && cp client /usr/bin/snowflake
RUN git clone && \
cd bridgetest/stun-test && go get -d && go build
COPY bridge_lines.txt /bridgetest/
RUN crontab /bridgetest/docker/probe-crontab
.PHONY: tag
@[ "${VERSION}" ] || ( echo "Env var VERSION is not set."; exit 1 )
docker tag $(IMAGE) $(IMAGE):$(VERSION)
docker tag $(IMAGE) $(IMAGE):latest
.PHONY: release
@[ "${VERSION}" ] || ( echo "Env var VERSION is not set."; exit 1 )
docker push $(IMAGE):$(VERSION)
docker push $(IMAGE):latest
.PHONY: build
docker build -t $(IMAGE) . --no-cache
.PHONY: deploy
docker-compose up -d snowflake-proxy
# Probetest docker image
This repository contains the docker files for our probe test
## Releasing a new image
First, build the image:
make build
Note: make sure that there is a file called `bridge_lines.txt` in the `docker/` directory. This will bake obfs4 bridge lines into the probe test image.
Next, release a new version by adding a tag:
make tag VERSION=X.Y
Finally, release the image:
make release VERSION=X.Y
Once we released a new image version, we tag the respective git commit:
git tag -a -s "vVERSION" -m "Docker image version VERSION."
git push --tags origin main
0 */6 * * * cd /bridgetest && ./ snowflake $SITENAME
0 2-23/6 * * * cd /bridgetest && ./ obfs4 $SITENAME
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment