我正在碼頭集裝箱內運行elasticsearch。如何將文件複製到已停止的碼頭集裝箱
雖然配置elasticsearch for ssl並屏蔽我的elasticsearch.yml
文件得到了非法條目,即TAB
而不是space
。
現在我的碼頭工人容器無法啓動,給了以下錯誤:
{1.4.4}: Setup Failed ...
- SettingsException[Failed to load settings from [file:/elasticsearch/config/elasticsearch.yml]]
IOException[Tabs are illegal in YAML. Did you mean to use whitespace character instead?]
org.elasticsearch.common.settings.SettingsException: Failed to load
settings from [file:/elasticsearch/config/elasticsearch.yml]
at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:947)
at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromUrl(ImmutableSettings.java:931)
at org.elasticsearch.node.internal.InternalSettingsPreparer.prepareSettings(InternalSettingsPreparer.java:77)
at org.elasticsearch.bootstrap.Bootstrap.initialSettings(Bootstrap.java:106)
at org.elasticsearch.bootstrap.Bootstrap.main(Bootstrap.java:177)
at org.elasticsearch.bootstrap.Elasticsearch.main(Elasticsearch.java:32)
Caused by: java.io.IOException: Tabs are illegal in YAML. Did you
mean to use whitespace character instead?
at org.elasticsearch.common.settings.loader.YamlSettingsLoader.load(YamlSettingsLoader.java:44)
at org.elasticsearch.common.settings.ImmutableSettings$Builder.loadFromStream(ImmutableSettings.java:944)
... 5 more
如何我可以在現有的容器編輯elasticsearch.yml
或更換它而不會丟失數據或替換elasticsearch.yml
文件?
感謝您的回覆。 –
if [docker commit] [1] newimage也會複製我的elasticsearch數據。 –
@AmitJamwal該容器的所有狀態及其所有數據將被凍結成新圖像。所以是的。但是,如果還可以取決於該容器的運行方式(docker run的確切語法是什麼?) – VonC