openzipkin-attic / docker-zipkin

Docker images for OpenZipkin
Apache License 2.0
689 stars 330 forks source link

docker进入kafka执行查看消费者命令显示not found #214

Closed Neptoned closed 5 years ago

Neptoned commented 5 years ago

Describe the Bug

docker进入kafka执行查看消费者命令显示not found,将kafka-console-consumer.sh命令第一行#!/bin/bash改成#!/busybox/sh后才能执行

Steps to Reproduce

[root@localhost middle]# docker exec -it kafka-zookeeper /bin/sh OCI runtime exec failed: exec failed: container_linux.go:345: starting container process caused "exec: \"/bin/sh\": stat /bin/sh: no such file or directory": unknown [root@localhost middle]# docker exec -it kafka-zookeeper /busybox/sh /kafka # ./bin/kafka-console-consumer.sh --bootstrap-server 127.0.0.1:9092 --topic test --from-beginning /busybox/sh: ./bin/kafka-console-consumer.sh: not found

Expected Behaviour

docker-zipkin-2.11.12版本正常,docker-compose.yml使用image: openzipkin/zipkin-kafka:2.11.12

codefromthecrypt commented 5 years ago

please try latest docker image as we don't re-release old ones. current is 2.15

Neptoned commented 5 years ago

Bug exists in version 2.15,docker exec -it kafka-zookeeper / busybox / sh。 / bin / kafka-console-consumer.sh scripts cannot be executed

codefromthecrypt commented 5 years ago

why are you using exec as opposed to just use run. you can use external scripts instead of this as a utility image

codefromthecrypt commented 5 years ago

I believe the reason this wouldn't work is because it is a distroless image

Neptoned commented 5 years ago

ok. thanks. i'll external use of port ip:19092