gpt4 book ai didi

maven - 使用带有fabric8 Maven插件的外部配置文件运行Docker镜像

转载 作者:行者123 更新时间:2023-12-02 20:01:57 25 4
gpt4 key购买 nike

我正在尝试使用maven在docker上运行elasticmq。您可以在下面找到我对docker的配置。而且在/src/main/resources/container/sqs/config文件夹下,我具有自定义队列配置名称,即elasticmq.conf

<image>
<alias>elastic-mq</alias>
<name>s12v/elasticmq</name>
<run>
<ports>${elasticmq.port}:9324</ports>
<volumes>
<bind>
<volume>${project.basedir}/src/main/resources/container/sqs/config/elasticmq.conf:/etc/elasticmq/elasticmq.conf</volume>
</bind>
</volumes>
</run>
<wait>
<tcp>
<host>127.0.0.1</host>
<ports>
<port>9324</port>
</ports>
</tcp>
</wait>
</image>

运行时出现此错误:
[ERROR] Failed to execute goal io.fabric8:docker-maven-plugin:0.22.1:build (start) on project xxx-xxx-xxx: Unable to parse configuration of mojo io.fabric8:docker-maven-plugin:0.22.1:build for parameter wait: Cannot find 'wait' in class io.fabric8.maven.docker.config.ImageConfiguration -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/PluginConfigurationException
[ERROR]
[ERROR] After correcting the problems, you can resume the build with the command
[ERROR] mvn <goals> -rf :xxx-xxx-xxx

有谁可以解决此问题或如何正确配置?

最佳答案

像下面这样固定,顺便说一句,我决定使用另一个与ElasticMQ有关的docker镜像。

<image>
<alias>elastic-mq</alias>
<name>softwaremill/elasticmq:0.14.6</name>
<run>
<ports>
<port>9324:9324</port>
</ports>
<volumes>
<bind>
<volume>${project.basedir}/src/main/resources/container/sqs/config/elasticmq.conf:/opt/elasticmq.conf</volume>
</bind>
</volumes>
</run>
</image>

关于maven - 使用带有fabric8 Maven插件的外部配置文件运行Docker镜像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52958947/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com