mirror of https://github.com/chaos-mesh/toda.git
modify example
Signed-off-by: Yang Keao <keao.yang@yahoo.com>
This commit is contained in:
parent
c2dc371576
commit
6a8a6d46c7
|
@ -1 +1,3 @@
|
|||
/target
|
||||
/example/toda
|
||||
/toda
|
7
Makefile
7
Makefile
|
@ -1,18 +1,15 @@
|
|||
example-image:
|
||||
example-image: image
|
||||
docker build -t io-example ./example
|
||||
|
||||
volume:
|
||||
docker volume create io-example
|
||||
|
||||
example: example-image volume
|
||||
docker run --ulimit nofile=5000:5000 -v io-example:/var/run/test -v /tmp:/tmp -it io-example /main-app
|
||||
docker run --privileged --ulimit nofile=5000:5000 -v io-example:/var/run/test -v /tmp:/tmp -it io-example /main-app
|
||||
|
||||
debug:
|
||||
cargo build
|
||||
|
||||
example-inject:debug
|
||||
cat ./io-inject-example.json|sudo ./target/debug/toda --path /var/run/test --pid $$(pgrep main-app) --verbose trace
|
||||
|
||||
image:
|
||||
DOCKER_BUILDKIT=1 docker build --build-arg HTTP_PROXY=${HTTP_PROXY} --build-arg HTTPS_PROXY=${HTTPS_PROXY} . -t chaos-mesh/toda
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ RUN go get -d -v ./...
|
|||
|
||||
RUN go build -o /go/bin/app
|
||||
|
||||
FROM alpine:3.12
|
||||
FROM chaos-mesh/toda
|
||||
COPY --from=build-env /go/bin/app /
|
||||
COPY --from=build-env /go/bin/app /main-app
|
||||
CMD ["/app"]
|
||||
|
|
|
@ -72,7 +72,7 @@ func main() {
|
|||
}
|
||||
}
|
||||
|
||||
time.Sleep(time.Microsecond)
|
||||
time.Sleep(time.Second)
|
||||
|
||||
buf := make([]byte, originalLength+len(count))
|
||||
n, err := f.Read(buf)
|
||||
|
|
Loading…
Reference in New Issue