我正在Windows 10 Home上使用Docker运行Landoop(图像)容器,使用WSL2。我可以做一个码头工人。具有多个服务的yaml文件:
#
# This docker-compose file starts and runs:
# * A 3-node kafka cluster
# * A 1-zookeeper ensemble
# * Schema Registry
# * Kafka REST Proxy
# * Kafka Connect
#
version: '3.7'
services:
zookeeper:
image: confluentinc/cp-zookeeper:5.2.2
ports:
- "2181:2181"
environment:
ZOOKEEPER_CLIENT_PORT: "2181"
kafka0:
image: confluentinc/cp-kafka:5.2.2
ports:
- "9092:9092"
environment:
KAFKA_BROKER_ID: 0
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
KAFKA_ADVERTISED_LISTENERS: "INTERNAL://kafka0:19092,EXTERNAL://${DOCKER_HOST_IP:-127.0.0.1}:9092"
KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL"
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL:PLAINTEXT,EXTERNAL:PLAINTEXT"
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: "1"
depends_on:
- "zookeeper"
schema-registry:
image: confluentinc/cp-schema-registry:5.2.2
ports:
- "8081:8081"
environment:
SCHEMA_REGISTRY_KAFKASTORE_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092"
SCHEMA_REGISTRY_LISTENERS: "http://0.0.0.0:8081"
SCHEMA_REGISTRY_HOST_NAME: "schema-registry"
SCHEMA_REGISTRY_KAFKASTORE_TOPIC_REPLICATION_FACTOR: "1"
depends_on:
- "kafka0"
rest-proxy:
image: confluentinc/cp-kafka-rest:5.2.2
ports:
- "8082:8082"
environment:
KAFKA_REST_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092"
KAFKA_REST_LISTENERS: "http://0.0.0.0:8082/"
KAFKA_REST_HOST_NAME: "rest-proxy"
KAFKA_REST_SCHEMA_REGISTRY_URL: "http://schema-registry:8081/"
depends_on:
- "kafka0"
- "schema-registry"
connect:
image: confluentinc/cp-kafka-connect:5.2.2
ports:
- "8083:8083"
environment:
CONNECT_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092"
CONNECT_GROUP_ID: "connect"
CONNECT_REST_ADVERTISED_HOST_NAME: "connect"
CONNECT_PLUGIN_PATH: "/usr/share/java"
CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter"
CONNECT_KEY_CONVERTER: "io.confluent.connect.avro.AvroConverter"
CONNECT_KEY_CONVERTER_SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
CONNECT_VALUE_CONVERTER: "io.confluent.connect.avro.AvroConverter"
CONNECT_VALUE_CONVERTER_SCHEMA_REGISTRY_URL: "http://schema-registry:8081"
CONNECT_CONFIG_STORAGE_TOPIC: "connect-config"
CONNECT_OFFSET_STORAGE_TOPIC: "connect-offset"
CONNECT_STATUS_STORAGE_TOPIC: "connect-status"
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1"
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1"
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1"
depends_on:
- "kafka0"
- "schema-registry"
ksql:
image: confluentinc/cp-ksql-server:5.2.2
ports:
- "8088:8088"
environment:
KSQL_BOOTSTRAP_SERVERS: "PLAINTEXT://kafka0:19092"
KSQL_LISTENERS: "http://0.0.0.0:8088"
KSQL_KSQL_SERVICE_ID: "ksql_service_docker"
KSQL_KSQL_SCHEMA_REGISTRY_URL: "http://schema-registry:8081/"
depends_on:
- "kafka0"
- "schema-registry"
connect-ui:
image: landoop/kafka-connect-ui:0.9.7
ports:
- "8084:8084"
environment:
PORT: "8084"
PROXY: "true"
CONNECT_URL: "http://connect:8083"
depends_on:
- "connect"
topics-ui:
image: landoop/kafka-topics-ui:0.9.4
ports:
- "8085:8085"
environment:
PORT: "8085"
PROXY: "true"
KAFKA_REST_PROXY_URL: "http://rest-proxy:8082"
depends_on:
- "rest-proxy"
schema-registry-ui:
image: landoop/schema-registry-ui:0.9.5
ports:
- "8086:8086"
environment:
PORT: "8086"
PROXY: "true"
SCHEMAREGISTRY_URL: "http://schema-registry:8081/"
depends_on:
- "schema-registry"
postgres:
image: postgres:11
ports:
- "5432:5432"
environment:
POSTGRES_USER: "cta_admin"
POSTGRES_PASSWORD: "chicago"
POSTGRES_DB: "cta"
volumes:
- ./producers/data/cta_stations.csv:/tmp/cta_stations.csv
- ./load_stations.sql:/docker-entrypoint-initdb.d/load_stations.sql
从现在开始,我只运行到连接用户界面服务,根据配置文件,连接用户界面服务应该绑定在端口8084上。当我尝试访问其他服务,如kafka或模式注册服务时,我能够通过以下方式看到相应端口上的输出:localhost:
我遇到了同样的问题,并发现运行Docker命令或任何其他使用sudo创建侦听器的命令都可以解决这个问题!将当前用户添加到docker组没有任何区别。
这是我的设置: -内部程序-慢响 我目前被迫使用Windows进行开发,因此我成为了microsoft insider成员,并以WSL2模式安装了ubuntu。Docker desktop支持WSL2的集成,所以我尝试了它。。。一个星期以来,它工作得完美无缺。今天电脑重启后,我无法让docker再次运行。Ubuntu可以从Docker桌面看到注入的二进制文件,但它不能再连接到windows托管的D
我已经创建了一个MySQL数据库的映像,并在容器中运行它。我希望它在端口3406/3407上运行,因此我调用docker run命令如下所示: 如果我看我的容器,它看起来是这样的: 我非常想连接到我的数据库现在,但我似乎不能使我的URL工作。 这是我的URL的样子:
问题内容: 我有用于创建mysql映像的docker- compose文件,并将端口公开给3306,但是当我尝试安装CMS时,出现了无法连接数据库的错误。我尝试扫描端口3306,并向我显示它已打开,因此mysql正在运行。 为什么两个Docker容器彼此看不到? 这是我的docker-compose文件: 问题答案: 要连接到数据库,请使用您作为主机名提供的链接/别名。因此,您的CMS可以使用主机
我正试图从PHP容器连接到容器化的MySQL数据库,虽然同一网络上的所有容器都是如此,但问题是,当我点击
我正在使用以下代码,但我的本地站点无法连接到DB docker run--name db-p 90:3306--restart=always--network wp mysql network-e mysql\u ROOT\u PASSWORD=ROOT-e mysql\u DATABASE=wordpress-e mysql\u USER=wpuser-e mysql\u PASSWORD=P@
相关帖子:1)docker postgres pgadmin本地连接 2)https://coderwall.com/p/qsr3yq/postgresql-with-docker-on-os-x(在示例中没有填写“name”条目) 有两种方法来完成这个任务,我使用正式的postgres 方法一: 并使用 然后使用pgAdmin选项卡属性填充信息连接