diff --git a/Dockerfile b/Dockerfile index 89469eb19..592126b11 100644 --- a/Dockerfile +++ b/Dockerfile @@ -5,4 +5,4 @@ ENTRYPOINT ["/toxiproxy"] CMD ["-host=0.0.0.0"] COPY toxiproxy-server-linux-* /toxiproxy -COPY toxiproxy-client-linux-* /toxiproxy-cli +COPY toxiproxy-cli-linux-* /toxiproxy-cli diff --git a/README.md b/README.md index 46b756006..1a0f42a7b 100644 --- a/README.md +++ b/README.md @@ -232,11 +232,15 @@ Old versions `<= 2.1.4` are available on on [Docker Hub](https://hub.docker.com/ ```bash $ docker pull ghcr.io/shopify/toxiproxy -$ docker run -it ghcr.io/shopify/toxiproxy +$ docker run --rm -it ghcr.io/shopify/toxiproxy ``` If using Toxiproxy from the host rather than other containers, enable host networking with `--net=host`. +```shell +$ docker run --rm --entrypoint="/toxiproxy-cli" -it ghcr.io/shopify/toxiproxy list +``` + **Source** If you have Go installed, you can build Toxiproxy from source using the make file: diff --git a/bin/e2e b/bin/e2e index 2d1cec46b..76e30696f 100755 --- a/bin/e2e +++ b/bin/e2e @@ -13,13 +13,6 @@ wait_for_url() { echo "== Setup" -server="./dist/toxiproxy-server" -client="./dist/toxiproxy-client" -server_ip="localhost" - -server="docker run --rm -it --net=host ghcr.io/shopify/toxiproxy:v2-amd64" -server_ip=$(docker-machine ip) - # Stop all background jobs on exit trap 'pkill -15 -f "dist/toxiproxy-server$"; pkill -15 -f "exe/endpoint$"' EXIT SIGINT SIGTERM @@ -29,7 +22,7 @@ go run testing/endpoint.go 2>&1 | sed -e 's/^/[web] /' & echo "=== Starting Toxiproxy" -$(server) 2>&1 | sed -e 's/^/[toxiproxy] /' & +./dist/toxiproxy-server 2>&1 | sed -e 's/^/[toxiproxy] /' & echo "=== Wait when service are available"