Skip to content

Commit

Permalink
Update document how to use docker server and clients
Browse files Browse the repository at this point in the history
  • Loading branch information
miry committed Sep 17, 2021
1 parent 5a30de2 commit 390be93
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 5 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
9 changes: 1 addition & 8 deletions bin/e2e
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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"

Expand Down

0 comments on commit 390be93

Please sign in to comment.