使用docker从1.3.1升级到2.0

使用docker从1.3.1升级到2.0,docker,thingsboard,Docker,Thingsboard,我正在用thingsboard 1.3.1运行docker,我想迁移到2.0,但我无法让它工作 我试图在容器的站点中触发升级脚本。 我得到了一个错误: Connector configured to listen on port 8080 failed to start ThingsBoard upgrade failed! Error creating bean with name 'thingsboardInstallService': Unsatisfied dependency ex

我正在用thingsboard 1.3.1运行docker,我想迁移到2.0,但我无法让它工作

我试图在容器的站点中触发升级脚本。 我得到了一个错误:

Connector configured to listen on port 8080 failed to start
ThingsBoard upgrade failed!
Error creating bean with name 'thingsboardInstallService': Unsatisfied 
dependency expressed through field 'databaseSchemaService'; nested exception 
is org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'sqlDatabaseSchemaService': Unsatisfied dependency 
expressed through field 'installScripts'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'installScripts': Unsatisfied dependency expressed 
through field 'ruleChainService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseRuleChainService': Unsatisfied dependency 
expressed through field 'relationService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseRelationService': Unsatisfied dependency 
expressed through field 'entityService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseEntityService': Unsatisfied dependency expressed 
through field 'deviceService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'deviceServiceImpl': Unsatisfied dependency expressed 
through field 'cacheManager'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'cacheManager' defined in class path resource [org/thingsboard
/server/dao/cache/CaffeineCacheConfiguration.class]: Invocation of init method 
failed; nested exception is java.lang.NullPointerException
ThingsBoard upgrade failed!
我试图在容器外部运行脚本。我得到了一个错误:

Connector configured to listen on port 8080 failed to start
ThingsBoard upgrade failed!
Error creating bean with name 'thingsboardInstallService': Unsatisfied 
dependency expressed through field 'databaseSchemaService'; nested exception 
is org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'sqlDatabaseSchemaService': Unsatisfied dependency 
expressed through field 'installScripts'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'installScripts': Unsatisfied dependency expressed 
through field 'ruleChainService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseRuleChainService': Unsatisfied dependency 
expressed through field 'relationService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseRelationService': Unsatisfied dependency 
expressed through field 'entityService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'baseEntityService': Unsatisfied dependency expressed 
through field 'deviceService'; nested exception is 
org.springframework.beans.factory.UnsatisfiedDependencyException: Error 
creating bean with name 'deviceServiceImpl': Unsatisfied dependency expressed 
through field 'cacheManager'; nested exception is 
org.springframework.beans.factory.BeanCreationException: Error creating bean 
with name 'cacheManager' defined in class path resource [org/thingsboard
/server/dao/cache/CaffeineCacheConfiguration.class]: Invocation of init method 
failed; nested exception is java.lang.NullPointerException
ThingsBoard upgrade failed!

感谢您的帮助

问题在于Thingsboard数据库。替换Docker映像不会更新数据库。因此,更新我找到的平台的唯一方法是:在docker容器外部安装Thingsboard 1.4.0,并使用“$sudo/usr/share/Thingsboard/bin/install/upgrade.sh--fromVersion=1.4.0”(Linux示例)启动更新脚本。这将更新Thingsboard的数据库。之后,可以简单地用预构建Thingsboard 2.0映像替换Docker容器。
我找不到从容器内部更新数据库的方法。

能否共享用于生成映像的Dockerfile?通常,解决方案是使用软件的新版本构建新映像,然后针对新映像启动新容器。在运行的容器中手动升级软件不是最佳做法。如果停止并删除容器,此升级将丢失。(你需要停止并删除一些常规的容器。)我不是要更新容器。正如我之前所写的,数据库结构需要更新,我无法找到使用提供的图像触发此更新的方法。如果我说得不够清楚,请道歉。