Docker compose

Docker compose

services:
  zookeeper:
    image: debezium/zookeeper
    ports:
      - "2181:2181"
      - "2888:2888"
      - "3888:3888"
  kafka:
    image: debezium/kafka
    ports:
      - "9092:9092"
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    depends_on:
      - "zookeeper"
  connect:
    image: debezium/connect
    ports:
      - "8083:8083"
    environment:
      - GROUP_ID=1 
      - CONFIG_STORAGE_TOPIC=my_connect_configs 
      - OFFSET_STORAGE_TOPIC=my_connect_offsets 
      - STATUS_STORAGE_TOPIC=my_connect_statuses
    depends_on:
      - "kafka"

docker-compose terminal into service container

docker-compose up exec [SERVICE_NAME] [TERMINAL]
#or
docker compose run --entrypoint /bin/sh [SERVICE_NAME]

[TERMINAL] could be sh, cmd, powershell

docker-compose

# launch the containers
docker-compose up [-d] [--build]

# launch the containers and opens interactive terminal inside
docker-compose run [SERVICE] 

# stop and remove containers
docker-compose down

# stop the containers, without removing
docker-compose stop