You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Docker Desktop下Eclipse Hono/Vorto/Ditto配置及问题咨询

Docker配置Eclipse Hono、Vorto、Ditto技术栈问题汇总

已完成操作

  • 通过docker-compose.yml文件下载了Eclipse Ditto和Eclipse Vorto镜像
  • 通过Maven命令获取了Eclipse Hono镜像(尚未创建容器)
  • 可通过Postman在Eclipse Ditto中创建策略、事物及连接;可在Eclipse Vorto Repository中创建信息模型、功能块,但Vorto无法生成Ditto代码,生成器区域显示未配置任何生成器

当前使用的docker-compose.yml配置

version: '3'
services:
  mongodb:
    container_name: mongodb
    image: docker.io/mongo:6.0
    deploy:
      resources:
        limits:
          memory: 256m
    networks:
      vorto_ditto:
        aliases:
          - mongodb
    command: mongod --storageEngine wiredTiger --noscripting
    user: mongodb
    ports:
      - 27017:27017
    environment:
       TZ: Europe/Berlin
    logging:
      options:
        max-size: 50m

  policies:
    container_name: policies
    image: docker.io/eclipse/ditto-policies:${DITTO_VERSION:-latest}
    deploy:
      resources:
        limits:
          memory: 512m
    networks:
      vorto_ditto:
        aliases:
          - ditto-cluster
    environment:
      - TZ=Europe/Berlin
      - BIND_HOSTNAME=0.0.0.0
      # Set additional configuration options here appending JAVTOOL_OPTIONS: -Dditto.policies...
      - JAVTOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class=
      - MONGO_DB_HOSTNAME=mongodb
      # in order to write logs into a file you can enable this by setting the following env variable
      # the log file(s) can be found in /var/log/ditto directory on the host machine
      # - DITTO_LOGGING_FILE_APPENDER=true
    # only needed if DITTO_LOGGING_FILE_APPENDER is set
    # volumes:
    #  - ditto_log_files:/var/log/ditto
    healthcheck:
      test: curl --fail `hostname`:7626/alive || exit 1
      interval: 30s
      timeout: 15s
      retries: 4
      start_period: 120s
    logging:
      options:
        max-size: 50m
        
  things:
    container_name: things
    image: docker.io/eclipse/ditto-things:${DITTO_VERSION:-latest}
    deploy:
      resources:
        limits:
          memory: 512m
    networks:
      vorto_ditto:
        aliases:
          - ditto-cluster
    depends_on:
      - policies
    environment:
      - TZ=Europe/Berlin
      - BIND_HOSTNAME=0.0.0.0
      # Set additional configuration options here appending JAVTOOL_OPTIONS: -Dditto.things...
      - JAVTOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class=
      - MONGO_DB_HOSTNAME=mongodb
      # in order to write logs into a file you can enable this by setting the following env variable
      # the log file(s) can be found in /var/log/ditto directory on the host machine
      # - DITTO_LOGGING_FILE_APPENDER=true
    # only needed if DITTO_LOGGING_FILE_APPENDER is set
    # volumes:
    #  - ditto_log_files:/var/log/ditto
    healthcheck:
      test: curl --fail `hostname`:7626/alive || exit 1
      interval: 30s
      timeout: 15s
      retries: 4
      start_period: 120s
    logging:
      options:
        max-size: 50m
        
  things-search:
    container_name: things-search
    image: docker.io/eclipse/ditto-things-search:${DITTO_VERSION:-latest}
    deploy:
      resources:
        limits:
          memory: 512m
    networks:
      vorto_ditto:
        aliases:
          - ditto-cluster
    depends_on:
      - policies
    environment:
      - TZ=Europe/Berlin
      - BIND_HOSTNAME=0.0.0.0
      # Set additional configuration options here appending JAVTOOL_OPTIONS: -Dditto.search...
      - JAVTOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class=
      - MONGO_DB_HOSTNAME=mongodb
      # in order to write logs into a file you can enable this by setting the following env variable
      # the log file(s) can be found in /var/log/ditto directory on the host machine
      # - DITTO_LOGGING_FILE_APPENDER=true
    # only needed if DITTO_LOGGING_FILE_APPENDER is set
    # volumes:
    #  - ditto_log_files:/var/log/ditto
    healthcheck:
      test: curl --fail `hostname`:7626/alive || exit 1
      interval: 30s
      timeout: 15s
      retries: 4
      start_period: 120s
    logging:
      options:
        max-size: 50m
        
  connectivity:
    container_name: connectivity
    image: docker.io/eclipse/ditto-connectivity:${DITTO_VERSION:-latest}
    deploy:
      resources:
        limits:
          memory: 768m
    networks:
      vorto_ditto:
        aliases:
          - ditto-cluster
    depends_on:
      - policies
    environment:
      - TZ=Europe/Berlin
      - BIND_HOSTNAME=0.0.0.0
      # if connections to rabbitmq broker are used, you might want to disable ExitOnOutOfMemoryError, because the amqp-client has a bug throwing OOM exceptions and causing a restart loop
      # Set additional configuration options here appending JAVTOOL_OPTIONS: -Dditto.connectivity...
      - JAVTOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class=
      - MONGO_DB_HOSTNAME=mongodb
      # in order to write logs into a file you can enable this by setting the following env variable
      # the log file(s) can be found in /var/log/ditto directory on the host machine
      # - DITTO_LOGGING_FILE_APPENDER=true
    # only needed if DITTO_LOGGING_FILE_APPENDER is set
    #volumes:
    #  - ditto_log_files:/var/log/ditto
    healthcheck:
      test: curl --fail `hostname`:7626/alive || exit 1
      interval: 30s
      timeout: 15s
      retries: 4
      start_period: 120s
    logging:
      options:
        max-size: 50m
        
  gateway:
    container_name: gateway
    image: docker.io/eclipse/ditto-gateway:${DITTO_VERSION:-latest}
    deploy:
      resources:
        limits:
          memory: 512m
    networks:
      vorto_ditto:
        aliases:
          - ditto-cluster
    depends_on:
      - policies
    ports:
      - "8081:8080"
    environment:
      - TZ=Europe/Berlin
      - BIND_HOSTNAME=0.0.0.0
      - ENABLE_PRE_AUTHENTICATION=true
      # Set additional configuration options here appending JAVTOOL_OPTIONS: -Dditto.gateway.authentication.devops.password=foobar -Dditto.gateway...
      - JAVTOOL_OPTIONS=-XX:ActiveProcessorCount=2 -XX:+ExitOnOutOfMemoryError -XX:+UseContainerSupport -XX:+UseStringDeduplication -Xss512k -XX:MaxRAMPercentage=50 -XX:+UseG1GC -XX:MaxGCPauseMillis=150 -Dpekko.coordinated-shutdown.exit-jvm=on -Dpekko.cluster.shutdown-after-unsuccessful-join-seed-nodes=180s -Dpekko.cluster.failure-detector.threshold=15.0 -Dpekko.cluster.failure-detector.expected-response-after=10s -Dpekko.cluster.failure-detector.acceptable-heartbeat-pause=20s -Dpekko.cluster.downing-provider-class=
      # in order to write logs into a file you can enable this by setting the following env variable
      # the log file(s) can be found in /var/log/ditto directory on the host machine
      # - DITTO_LOGGING_FILE_APPENDER=true
      # You may use the environment for setting the devops password
      #- DEVOPS_PASSWORD=foobar
    # only needed if DITTO_LOGGING_FILE_APPENDER is set
    # volumes:
    #  - ditto_log_files:/var/log/ditto
    healthcheck:
      test: curl --fail `hostname`:7626/alive || exit 1
      interval: 30s
      timeout: 15s
      retries: 4
      start_period: 120s
    logging:
      options:
        max-size: 50m
        
  ditto-ui:
    container_name: ditto-ui
    image: docker.io/eclipse/ditto-ui:${DITTO_VERSION:-latest}
    deploy:
      resources:
        limits:
          memory: 32m
    logging:
      options:
        max-size: 10m
    networks:
      vorto_ditto:
        aliases:
          - ditto-ui
        
  swagger-ui:
    container_name: swagger-ui
    image: docker.io/swaggerapi/swagger-ui:v5.9.1
    deploy:
      resources:
        limits:
          memory: 32m
    environment:
      - QUERY_CONFIG_ENABLED=true
    volumes:
       - ./ditto/documentation/src/main/resources/openapi:/usr/share/nginx/html/openapi:ro
       - ./ditto/documentation/src/main/resources/images:/usr/share/nginx/html/images:ro
       - ./ditto/swagger3-index.html:/usr/share/nginx/html/index.html:ro
    command: nginx -g 'daemon off;'
    logging:
      options:
        max-size: 10m
    networks:
      vorto_ditto:
        aliases:
          - swagger-ui
        
  nginx:
    container_name: nginx
    image: docker.io/nginx:1.21-alpine
    deploy:
      resources:
        limits:
          memory: 32m
    volumes:
       - ./ditto/nginx.conf:/etc/nginx/nginx.conf:ro
       - ./ditto/nginx.htpasswd:/etc/nginx/nginx.htpasswd:ro
       - ./ditto/nginx-cors.conf:/etc/nginx/nginx-cors.conf:ro
       - ./ditto/mime.types:/etc/nginx/mime.types:ro
       - ./ditto/index.html:/etc/nginx/html/index.html:ro
       - ./ditto/documentation/src/main/resources/images:/etc/nginx/html/images:ro
       - ./ditto/documentation/src/main/resources/wot:/etc/nginx/html/wot:ro
    ports:
      - "${DITTO_EXTERNAL_PORT:-8080}:80"
    depends_on:
      - gateway
      - swagger-ui
    logging:
      options:
        max-size: 10m
    networks:
      vorto_ditto:
        aliases:
          - nginx


  repository:
    depends_on:
      - "db"
    container_name: repository
    image: eclipsevorto/vorto-repo
    volumes:
      - ~/.vorto:/root/.vorto
    ports:
      - "8083:8080"
    env_file:
      - ./vorto/vorto-variables.env
    networks:
      vorto_ditto:
        aliases:
          - repository
  db:
    volumes:
       - ./opt/mysql_data:/var/lib/mysql
    container_name: db
    image: mysql
    command: --default-authentication-plugin=mysql_native_password
    env_file:
      - ./vorto/vorto-variables.env
    networks:
      vorto_ditto:
        aliases:
          - db


networks:
  vorto_ditto:
    driver: bridge

volumes:
  ditto_log_files:
    driver: local
    driver_opts:
      type: none
      device: /var/log/ditto
      o: bind,uid=1000,gid=1000

疑问列表

  • 这些Eclipse项目在2024年及未来是否仍受支持?
  • 已知可通过API控制Eclipse Ditto,但找不到Eclipse Vorto的API文档,是否存在?Eclipse Hono的API文档呢?
  • 是否有关于配置Eclipse Hono与Vorto、Vorto与Ditto的教程/演示?
  • Bosch IoT Suite的作用是什么?我的小型项目是否需要它?
  • Eclipse Vorto Repository中看不到生成器,可能的原因是什么?
  • vorto.eclipse.org网站已无法访问,该网站曾可生成设备配置的Postman脚本,是否有替代方案?

已花费约两周时间寻找Docker配置这三个组件的解决方案,多数视频仅侧重理论与演示,缺乏实操细节。部分相关网站如vorto.eclipse.org及演示链接已无法访问,需要实操性指导或资源解决上述问题。

内容的提问来源于stack exchange,提问作者Aissam en

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.06.28 19:25:55