bash:: command not found

196 views
Skip to first unread message

Oğuzhan

unread,
Sep 7, 2022, 4:22:15 AM9/7/22
to debezium

I created a docker-compose file and run it. It works fine but when I get inside the containers no command works. even apt-get or apt, it gives only command not found error. I dont know why?

in mac os intel.
docker version: 20.10.13

version: '2' 
services:   zookeeper:     
image: debezium/zookeeper     
ports:      
 - 2181:2181     
 - 2888:2888       
- 3888:3888   
kafka:     
image: debezium/kafka     
ports:       - 9092:9092     
environment:      
 - ZOOKEEPER_CONNECT=zookeeper:2181   
postgres:     
container_name: postgresql     
image: debezium/postgres:11     
ports:       
- 5432:5432     
environment:       
- POSTGRES_DB=debezium       
- POSTGRES_USER=user       
- POSTGRES_PASSWORD=password   
connect:     
image: debezium/connect     
ports:       
- 8083:8083       
- 5005:5005     
environment:      
 - BOOTSTRAP_SERVERS=kafka:9092       
- GROUP_ID=1       
- CONFIG_STORAGE_TOPIC=my_connect_configs       
- OFFSET_STORAGE_TOPIC=my_connect_offsets      
 - STATUS_STORAGE_TOPIC=my_source_connect_statuses


jiri.p...@gmail.com

unread,
Sep 7, 2022, 4:24:49 AM9/7/22
to debezium
Are you sure you are inside the container? Does command like ls or pwd work? Does microdnf command work?

J.

Oğuzhan

unread,
Sep 7, 2022, 4:27:00 AM9/7/22
to debezium
Yeah of course docker ps. docker exec -it dontainer_id bash. I am using docker almost 4 year and I come across with this problem first time

7 Eylül 2022 Çarşamba tarihinde saat 11:24:49 UTC+3 itibarıyla jiri.p...@gmail.com şunları yazdı:

Oğuzhan

unread,
Sep 7, 2022, 4:28:47 AM9/7/22
to debezium

dCONTAINER ID   IMAGE                  COMMAND                  CREATED        STATUS        PORTS                                                                    NAMES

a34e34516bdf   debezium/kafka         "/docker-entrypoint.…"   16 hours ago   Up 16 hours   0.0.0.0:9092->9092/tcp                                                   docker-kafka-1

1500945fd17c   debezium/connect       "/docker-entrypoint.…"   16 hours ago   Up 16 hours   0.0.0.0:5005->5005/tcp, 0.0.0.0:8083->8083/tcp, 9092/tcp                 docker-connect-1

d475c9993513   debezium/zookeeper     "/docker-entrypoint.…"   16 hours ago   Up 16 hours   0.0.0.0:2181->2181/tcp, 0.0.0.0:2888->2888/tcp, 0.0.0.0:3888->3888/tcp   docker-zookeeper-1

58896bc0547b   debezium/postgres:11   "docker-entrypoint.s…"   20 hours ago   Up 16 hours   0.0.0.0:5432->5432/tcp                                                   postgresql

xxx@ip:docker % docker exec -it a34e34516bdf bash

[kafka@a34e34516bdf ~]$ apt-get update

bash: apt-get: command not found

[kafka@a34e34516bdf ~]$ apt update

bash: apt: command not found

[kafka@a34e34516bdf ~]$ vim

bash: vim: command not found

[kafka@a34e34516bdf ~]$ vi

bash: vi: command not found

[kafka@a34e34516bdf ~]$ 

7 Eylül 2022 Çarşamba tarihinde saat 11:27:00 UTC+3 itibarıyla Oğuzhan şunları yazdı:

Oğuzhan

unread,
Sep 7, 2022, 4:30:09 AM9/7/22
to debezium
yes pwd ls works


7 Eylül 2022 Çarşamba tarihinde saat 11:28:47 UTC+3 itibarıyla Oğuzhan şunları yazdı:

Gunnar Morling

unread,
Sep 7, 2022, 4:31:08 AM9/7/22
to debe...@googlegroups.com
This image is based on Fedora Minimal, so the package manager to use
more packages is microdnf, not apt.

--Gunnar

Am Mi., 7. Sept. 2022 um 10:28 Uhr schrieb Oğuzhan
<kayao...@windowslive.com>:
> --
> You received this message because you are subscribed to the Google Groups "debezium" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to debezium+u...@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/debezium/58174da5-4098-41fa-92d5-58f0f26eb2c8n%40googlegroups.com.

Oğuzhan

unread,
Sep 7, 2022, 4:31:59 AM9/7/22
to debezium

[kafka@a34e34516bdf config]$ microdnf

error: Failed to create: /var/cache/yum/metadata

[kafka@a34e34516bdf config]$ 


7 Eylül 2022 Çarşamba tarihinde saat 11:31:08 UTC+3 itibarıyla Gunnar Morling şunları yazdı:

jiri.p...@gmail.com

unread,
Sep 7, 2022, 4:33:10 AM9/7/22
to debezium
So it works, you just need to run as root.

J.

Oğuzhan

unread,
Sep 7, 2022, 7:23:00 AM9/7/22
to debezium
thanks I can do something now
7 Eylül 2022 Çarşamba tarihinde saat 11:33:10 UTC+3 itibarıyla jiri.p...@gmail.com şunları yazdı:
Reply all
Reply to author
Forward
0 new messages