Quantcast
Channel: Active questions tagged ubuntu - Stack Overflow
Viewing all articles
Browse latest Browse all 6144

"dub: command not found" when docker-compose up

$
0
0

Basically, what I'm trying is to create a firstly an Ubuntu enviroment where execute a zookeeper and a kafka server.

Firstly, I created a dockerfile where I define the Ubuntu enviroment:

FROM ubuntu:latestRUN apt-get update && apt-get upgrade -yRUN apt-get install -y openjdk-8-jdkRUN apt-get install -y sudoRUN apt-get install -y dubRUN apt-get install -y wget rsyncRUN useradd -m docker && echo "docker:docker" | chpasswd && adduser docker sudoRUN wget https://downloads.apache.org/kafka/3.7.0/kafka_2.13-3.7.0.tgzRUN tar -xvf kafka_2.13-3.7.0.tgzRUN mkdir -p /home/servidor-kafka/kafkaRUN rsync -av --remove-source-files kafka_2.13-3.7.0/ /home/servidor-kafka/kafka/RUN rm kafka_2.13-3.7.0.tgzRUN wget https://downloads.apache.org/zookeeper/zookeeper-3.7.2/apache-zookeeper-3.7.2-bin.tar.gzRUN tar -xvf apache-zookeeper-3.7.2-bin.tar.gzRUN mkdir -p /home/servidor-kafka/zookeeperRUN rsync -av --remove-source-files apache-zookeeper-3.7.2-bin/ /home/servidor-kafka/zookeeper/RUN rm apache-zookeeper-3.7.2-bin.tar.gzWORKDIR /home/servidor-kafka/kafkaEXPOSE 9092 2181USER dockerCMD ["/bin/bash"]

Then I create my docker-compose.yml like:

version: '3.8'services:  zookeeper:    image: confluentinc/cp-zookeeper:latest    container_name: zookeeper    user: "1000:1000"    environment:      ZOOKEEPER_CLIENT_PORT: 2181      ZOOKEEPER_TICK_TIME: 500    ports:      - 2181:2181    volumes:      - /home/servidor-kafka/zookeeper  kafka-broker-1:    image: confluentinc/cp-kafka:latest    container_name: kafka-broker-1    depends_on:      - zookeeper    user: "1000:1000"    environment:      KAFKA_BROKER_ID: 1      KAFKA_ZOOKEEPER_CONNECT: 'zookeeper:2181'      KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: PLAINTEXT:PLAINTEXT,PLAINTEXT_INTERNAL:PLAINTEXT      KAFKA_ADVERTISED_LISTENERS: PLAINTEXT://localhost:9092,PLAINTEXT_INTERNAL://broker:29092      KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1      KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1      KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1    ports:      - "9092:9092"    volumes:      - /home/servidor-kafka/kafka

When I docker build it I get no problems but when I execute "docker-compose up" i get:

/etc/confluent/docker/configure: line 40: dub: command not found

Which is weird because I already RUN apt-get install -y dub in the dockerfile.

When running zookeeper and kafka.

Can I get some feedback? Thank you.


Viewing all articles
Browse latest Browse all 6144

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>