docker启动elasticsearch:7.17.1容器:

docker run --restart=always --name elasticsearch -d -e ES_JAVA_OPTS="-Xms1024m -Xmx1024m" -e "discovery.type=single-node" -p 8880:9200 -p 8881:9300 -v /home/elasticsearch/data:/usr/share/elasticsearch/data -v /home/elasticsearch/logs:/usr/share/elasticsearch/logs  elasticsearch:7.17.1

启动后需要手动配置账密:

  1. docker exec -it elasticsearch /bin/bash

  2. 在Elasticsearch的配置文件(elasticsearch.yml)中添加以下配置:

    http.cors.enabled: true
    http.cors.allow-origin: "*"
    http.cors.allow-headers: Authorization
    xpack.security.enabled: true
    xpack.security.transport.ssl.enabled: true
    

  3. 退出重启容器后再次进入Elasticsearch容器。
  4. 在容器内部执行以下命令来设置用户名和密码
    ./bin/elasticsearch-setup-passwords interactive
    
    
    出现:
    Initiating the setup of passwords for reserved users elastic,apm_system,kibana,logstash_system,beats_system,remote_monitoring_user.
    You will be prompted to enter passwords as the process progresses.
    Please confirm that you would like to continue [y/N]y
    
    
    Please confirm that you would like to continue [y/N]y
    
    
    Enter password for [elastic]: 
    Reenter password for [elastic]: 
    Enter password for [apm_system]: 
    Reenter password for [apm_system]: 
    Enter password for [kibana]: 
    Reenter password for [kibana]: 
    Enter password for [logstash_system]: 
    Reenter password for [logstash_system]: 
    Enter password for [beats_system]:
    
    Reenter password for [beats_system]: 
    Enter password for [remote_monitoring_user]: 
    Reenter password for [remote_monitoring_user]: 
    Changed password for user [apm_system]
    Changed password for user [kibana]
    Changed password for user [logstash_system]
    Changed password for user [beats_system]
    Changed password for user [remote_monitoring_user]
    Changed password for user [elastic]
    
  5. 交互式设置密码完成后,需要再次重启Elasticsearch容器

因为docker启动elasticsearch时设置的内存XMS和XMX数值过高,在不重新run容器的前提下,修改/var/lib/docker/overlay2中的配置文件降低容器的内存占用。

步骤:

1、查找容器的jvm配置

 find /var/lib/docker/overlay2 -name jvm.options



/var/lib/docker/overlay2/c88109931c70d44efd8d929e107c6e41138495d2f3c111f57da6e8740e64eb11/diff/usr/share/elasticsearch/config/jvm.options
/var/lib/docker/overlay2/97e437947e2e73d7583b0e70584b52e0a7a9711fe84137bf5e56094b74b44690/diff/usr/share/elasticsearch/config/jvm.options
/var/lib/docker/overlay2/f859bc1f9b6198b7fdeb2b6d02fbf8b6719b76b368c5a63c799703e750bce9d7/merged/usr/share/elasticsearch/config/jvm.options
/var/lib/docker/overlay2/a4f6fe2dab076230a4576b44348d5ad619f14d2313658ef098512203265d5bda/diff/usr/share/elasticsearch/config/jvm.options
/var/lib/docker/overlay2/55fea579f0bb19cfe0a90aed45b419f733be016463af7b71e508db46ca7c47cb/diff/usr/share/elasticsearch/config/jvm.options
/var/lib/docker/overlay2/a2a88c373fc3fd771f96859a3b7c8657f2b9737c772765dbbe6260b15fc9cef1/diff/usr/share/elasticsearch/config/jvm.options

2、docker的存储结构是分层存储,除了底层外,每一层都包含包含了一个文件lower,它指定了他的底层(父层)diff文件夹也是存储了这个层的具体内容merged文件夹包含了它和它的父层的合并内容,work文件夹提供Overlay内部使用。我们直接查看上一步查询出merged文件那一层:

ls /var/lib/docker/overlay2/f859bc1f9b6198b7fdeb2b6d02fbf8b6719b76b368c5a63c799703e750bce9d7

结果:
diff  link  lower  merged  work

查看lower文件内容
l/V77JD7UNQKAINIZG2XRDOX2SZR:l/3Q2IDKVLNVXFOYVIWUY7DZDPSS:l/I46JEERAUWX4DETFVGXRM35LSM:l/QUVGFYNTFBLIQZKTNL7GP5C7TL:l/72ZHJBXWODG6UPWB35VZCYYL7D:l/24IL2N5MKHYQB446SBSA4Y2QSQ:l/NFLC5U2D7G3J7NFBXB2PVR4SXS:l/KBK2RQAYDKESDQWIUC2XPLGFT4:l/5F6ZOSTSRFXIZBEOKLB4YTQT6F:l/A4QZSOLRLUV2JC7D23RL56AWX6:l/SYVSGYGUNEFPQQMNLVN3UYHLKR

3、根据lower文件内容可以获取其上级目录层次。具体目录链接可以查询/var/lib/docker/overlay2/l目录的软连接获取

lrwxrwxrwx 1 root root 72 Jul  7  2020 24IL2N5MKHYQB446SBSA4Y2QSQ -> ../2b8fae1dced0419b96b4986dda8b48057c362a985b77317ff6d88ef1d6f5ce05/diff
lrwxrwxrwx 1 root root 72 Jun 18  2020 2RJI6SPYKAP7YHUUD2Z7KHGUAF -> ../565c175faa8d7f225d74f573229001ce75d26ab53f5afd5e21e7eb3571136688/diff
lrwxrwxrwx 1 root root 72 Sep 18  2020 2SFHOOXCHKZCRNDIFURM6INXHS -> ../f73967449f299da28b04acbcb19305180f1822ae97db45190765c577ee172935/diff
lrwxrwxrwx 1 root root 72 Jun 18  2020 3BJHSEENF2LFYOH66EB4EJGZCT -> ../1770470fb788392a9e353da540be7423f88fb7afac93f00c909156ea8cd23cf1/diff
lrwxrwxrwx 1 root root 77 Aug  5 22:11 3NFLCQSQGQ7LJVVEU7TUSPPDZR -> ../0698bc031d2d698be45ea708e8df2a81f56b594a91b6366e918f2e7514ca5d8b-init/diff
lrwxrwxrwx 1 root root 72 Aug  5 22:11 3OBJD2RHU66JLIA27E64JWF7KC -> ../1ea24c22599bfafe8670c9bc1b19363c042fc21bc2ab02c19ac99458acab8634/diff
lrwxrwxrwx 1 root root 72 Nov  4  2020 3Q2IDKVLNVXFOYVIWUY7DZDPSS -> ../ec25965935ad592a5da43fb24f353cfc6f718030aa699c4682d8134543c2c6b9/diff
lrwxrwxrwx 1 root root 72 Jun 22 21:58 3WELOKUCSNYBIY2M5SAQA5F55B -> ../428ae922f1e9881140bcac29dd4ce950aff7a3dc0de11a840bcb528deacc56ed/diff
lrwxrwxrwx 1 root root 72 Aug  5 22:10 4EQF2WBAKRS5ULCTVH2M7A5PXU -> ../77dd6fc0ebbdf9dcdce37f5815bcd3a1bc52755f43020c9758604b720b97d621/diff
lrwxrwxrwx 1 root root 72 Aug 25  2020 4M2FBUCDM6N47KFTZCU7MFOCT7 -> ../d6d000716076a857fbe6b44ead4ebb43b63045e4e8895590812d1a4af83bbfc0/diff
lrwxrwxrwx 1 root root 72 Jul  7  2020 5F6ZOSTSRFXIZBEOKLB4YTQT6F -> ../8521d4d01f8fc89e9eca38942218444d298703090ebbc5d8069eb8ac667b389b/diff
lrwxrwxrwx 1 root root 72 Sep 16  2020 5JURRKWYJTYVLIFISZ2ZE36VSU -> ../a4f6fe2dab076230a4576b44348d5ad619f14d2313658ef098512203265d5bda/diff
lrwxrwxrwx 1 root root 72 Oct 21  2020 5Y7GG2WFVOCSBJDKJYAQ52MPJ7 -> ../df0301d26c4a034ad928f304af4907160c188491fca5cfe4a9bf8a41f53bb76c/diff
lrwxrwxrwx 1 root root 72 Sep  8  2020 6ENDMHKVMRZTRJWQJOUYEJL2RQ -> ../bea3a5fa4898c7d42d275fb87923d068c5bff200a7ad1975aaa68e30574164f4/diff
lrwxrwxrwx 1 root root 72 Jan 11  2021 6SVJ3QQBCBB3WXQ2XHKOHDRDAH -> ../fa9d2e58e337248ae866865b5dc84fffb9f507fb536649586680c6eab570ee15/diff
lrwxrwxrwx 1 root root 72 Feb  5  2021 6SZ6FNJG6MZJW7SL5WHNZ6CZYK -> ../0238dc336366e1d11f5a568141c7c2029ae28e6d0e751bd65e8a4ba868c8af54/diff
lrwxrwxrwx 1 root root 72 Jul  7  2020 72ZHJBXWODG6UPWB35VZCYYL7D -> ../ef3cd02a05dec24511a0a6141ec70503e754736df943af55b9e7a3fb6c4c37c5/diff
lrwxrwxrwx 1 root root 72 Sep 27  2020 7J4FCAVTEGLDF5UON2QGK6JLTK -> ../fd3c355a3c2a24b5438c8e1dfdcaa1b980d86f0b2672b6ba524ffbcf15ee15e8/diff
lrwxrwxrwx 1 root root 72 Jul  7  2020 A4QZSOLRLUV2JC7D23RL56AWX6 -> ../ad8f73316d398bea84790dd0793c1eed3cfca04ee06c0e50e74861bbd3054062/diff
lrwxrwxrwx 1 root root 72 Jun 18  2020 A67ZANXTYLJ4JWMTEXRX52XP4J -> ../46bfdb5c2adf8daca4e50172b1c1857b4c50af41e563b7ea34cf8947e859765d/diff
lrwxrwxrwx 1 root root 72 Jul  8  2020 ADTB2YDTTMXAWDULIDLPBAP4HW -> ../4c3eb740fa63a00e91261096c7b61252863460d1f3f004da6752e61841c14a92/diff
lrwxrwxrwx 1 root root 72 Oct 20  2020 AHRW5TCS3S56VL6FRBJO77SSTD -> ../cddec549f11a482772d9c5d01a3fcdc66af7bb6b0aa684609ecbc3d104f1ab2f/diff
lrwxrwxrwx 1 root root 72 Sep 30  2020 AQDRXUE6VZPZ7WSWAHR722LRNA -> ../10816f5c8ccc9ca2e6a603df2f77c6d87ebdcfcce09f8be5fe5c5196947e485f/diff
lrwxrwxrwx 1 root root 72 Nov  4  2020 AW7PQWIYSBNNJC4DYKKXT27S46 -> ../f859bc1f9b6198b7fdeb2b6d02fbf8b6719b76b368c5a63c799703e750bce9d7/diff
lrwxrwxrwx 1 root root 72 Dec 30  2020 BDWGHINKJYLZZT5R6VQBMHNIQC -> ../a21be8ea77ea17363300fb935a8c41dac23c2c1f13bc431d817ab7ac61a12b3b/diff
lrwxrwxrwx 1 root root 72 Nov 19  2020 BEHCUYV7CFG3ALSPQFZ5MK75LE -> ../0749be19949b212c05d0bdb85ceb58013584859e0a73136a215b8701a8913db6/diff
lrwxrwxrwx 1 root root 77 Aug  5 22:10 C2BGR4LHUNWNG3KQKK6KUWJIBF -> ../67c69d4aa350bcfb57ccd150207114e8ae6c56b1decaa7d7b13243755a317bd6-init/diff
lrwxrwxrwx 1 root root 72 Jul 29  2020 CTUBCW7QHXZGJ34Y6MEGBZPV7G -> ../48c99ca02448489bcd74d3c95cad89ef3443d42822602abddd2fe043c491cf36/diff
lrwxrwxrwx 1 root root 72 Sep  7  2020 D5YHSKCOKDE2BVJZARO5UIO2E7 -> ../a2a88c373fc3fd771f96859a3b7c8657f2b9737c772765dbbe6260b15fc9cef1/diff
lrwxrwxrwx 1 root root 72 Nov 24  2020 DZBEAZM4EGQZRFAK53UGQF2S2I -> ../61707f5c2fa29f66fe20dd089d8283c901a63c5760c6aa695febab479227f9c3/diff
lrwxrwxrwx 1 root root 72 Aug  5 22:11 EB275YV2U7WZZJTTGAFSTTKHBR -> ../0698bc031d2d698be45ea708e8df2a81f56b594a91b6366e918f2e7514ca5d8b/diff
lrwxrwxrwx 1 root root 72 Jul 29  2020 HTEXZBZGM6S5ZHT7DGKF6USG4X -> ../26e0729ce35c82664ee5bd826e06b4a9d2643d603b4ccf63e76245dbbd865853/diff
lrwxrwxrwx 1 root root 72 Nov  4  2020 I46JEERAUWX4DETFVGXRM35LSM -> ../97e437947e2e73d7583b0e70584b52e0a7a9711fe84137bf5e56094b74b44690/diff
lrwxrwxrwx 1 root root 72 Jul  7 21:36 IBCELXI43K4RMYZRUAR66GI3BO -> ../20cc33a44625fd19ac90e0c0e9a4332fdc9f6e5c990e2523b5de9bf3665e5eb9/diff
lrwxrwxrwx 1 root root 72 Sep 30  2020 IHBYX6OTTKSPPW2FUURLZRENR6 -> ../d9ee60725c7e7115bbde417e8df90d5fbeed94ec441b3f2b68aefac6767cf1a2/diff
lrwxrwxrwx 1 root root 72 Apr 29 21:58 ISHGLTRIZCCGF4U4Y7K6DJC6SA -> ../851e59a7e41498cd0c3ddeecd41c22ba938628cfdb0a55df7c1cce6abca77101/diff
lrwxrwxrwx 1 root root 72 Sep 16  2020 IVUOWYC6TGVNJJYKEEQCWHCGE5 -> ../1897075e1dbecbdf85ae140f5f622f50437c4de048aad4facc7f9cc6da7a936d/diff
lrwxrwxrwx 1 root root 72 Jul  7 23:19 K3XQCDIFLXEEFHPY2VINPL6HGN -> ../a228863aed010aef370a79aa14cbb46f41cec66493c2fb16d334e43ad1d37bde/diff
lrwxrwxrwx 1 root root 72 Jul  7  2020 KBK2RQAYDKESDQWIUC2XPLGFT4 -> ../c88109931c70d44efd8d929e107c6e41138495d2f3c111f57da6e8740e64eb11/diff
lrwxrwxrwx 1 root root 72 Mar 18  2021 KWGQIWWBYKFCTLD5CBE37LKODO -> ../4b7d7867e9363667d5d2c984c46d6f43332713ba00f583811011814de33ab641/diff
lrwxrwxrwx 1 root root 72 Mar  9  2021 L26BI2OPOBSJDA4QNVXQCBIIG5 -> ../86423cb311b4a8da15fc1b155800e69e706e830845071e6507ce934e7c14af9f/diff
lrwxrwxrwx 1 root root 72 Sep 10  2020 LTXMCAB4JDO6S6BVE44ZVVSWWY -> ../5e5534466c038477e649b6801dd52b05cbed6a3ea5b8a9da5effa3516afbeba3/diff
lrwxrwxrwx 1 root root 77 Jun 18  2020 MO7Z2EPXAVUBGUO2YEST4NP3TI -> ../46bfdb5c2adf8daca4e50172b1c1857b4c50af41e563b7ea34cf8947e859765d-init/diff
lrwxrwxrwx 1 root root 72 Mar 24  2020 MPCB3WW7E2GGQI4DXEJZRQU3EV -> ../73fd39317cc5faadda99aa647fc54555f58b09226588da4161294881158faa61/diff
lrwxrwxrwx 1 root root 72 Mar 24  2020 MQ7Q5PXTPPKZDC4NWODV4XUAVR -> ../576db430babb7e006ef93f6267669594fa9020ffc5857def3b79a01465ae27c5/diff
lrwxrwxrwx 1 root root 72 Jan 28  2021 N55LPGK7RIZAB5FGCC56HQEJPD -> ../80f04d1b4d3252579730dd2e1bb2f21190221bea097ab3299f00b21b0836c005/diff
lrwxrwxrwx 1 root root 72 Dec 29  2020 NBP23PXOUS6YRYMNO2XK7Z5IKV -> ../decdc427ec50f0b79ac164c34e931ec95986311a1d4fcdd6ead08d488b0a4419/diff
lrwxrwxrwx 1 root root 72 Jul  7  2020 NFLC5U2D7G3J7NFBXB2PVR4SXS -> ../e7eaf39cca5086a96826e15da0b0e05464d111b8361b34b98a24d5039ec9d985/diff
lrwxrwxrwx 1 root root 72 Jun  8 21:52 NHGPJDKQKJNVJVJYE7GK6OCXUP -> ../255e9bdbef7fdb821f7aab2585c8372cc5f6873a33f5e7ec5d26280bf39516d6/diff
lrwxrwxrwx 1 root root 72 Jul 29  2020 NZ5SQOXUBOMH6YBCYFP2XODNYP -> ../b3614178d47aff1ff13b543b2df013677d747f35841b07c818f2c0e0515c4766/diff
lrwxrwxrwx 1 root root 72 Jun  8 23:08 OTCNFUIS4W47HROQSFQBMJHBCZ -> ../35ff3f4b4c32efd318409c55f0a081c0a94721b0b82e9b1d8a33b37b9cb1965b/diff
lrwxrwxrwx 1 root root 72 Jun 18  2020 PB3UGG35OPCTYQUBZRL4VCET7V -> ../70f5800aabbc45c2e77d991adad5f8088c62952462c9df55fd21ca17d5297da9/diff
lrwxrwxrwx 1 root root 72 Sep  7  2020 PO3VIRBQKF6ASWERV445QOAXLM -> ../973661792e4589b8c4a5c9e28c0ecd9f2dd12f0527bfe4333c184082f1a313c3/diff
lrwxrwxrwx 1 root root 72 Mar 24  2020 PQFOEBEL5TKHUYWU2HMWYTSBL2 -> ../c576fa65f3522ee4ad52d37405b0597b7c422e26ebfc1c6803cb882fac8d891a/diff
lrwxrwxrwx 1 root root 72 Sep 16  2020 Q7C7ZKFHO246TEKKBKFN3EK25P -> ../f6e61a7fa8748792944ac5548d52f7780a945c2117fe256cbd01a843cbe65bf0/diff
lrwxrwxrwx 1 root root 72 Jul 27 22:01 QCU6RWQBE24EVZ3OXWJD2E6S7D -> ../57c0ff0343021838c72e9873e04af4f5f53ca782ba65597482f814c81de58a05/diff
lrwxrwxrwx 1 root root 72 Apr 14  2020 QFFGK3IM4TXOPJLFAT2RKIXTBV -> ../f595635574464e348a5ccb7f62447b4af9749d5a2c7b2ca1297f2947df1c2a12/diff
lrwxrwxrwx 1 root root 72 Jan 11  2021 QLVPDGQT3L6BPFMK7EC2YEM6EE -> ../4232e0c0597753bf40b830b86dae812cfb05a51de516ef923b1a57cf6db6e42f/diff
lrwxrwxrwx 1 root root 72 Mar 25  2021 QNBIKURMK2EZ6DMJT7XV65ZEIR -> ../4224726e58c176898272fe77fde62d937e61713c778b4bc1c4456b6e267fb5af/diff
lrwxrwxrwx 1 root root 72 Nov  4  2020 QUVGFYNTFBLIQZKTNL7GP5C7TL -> ../2c1fe6b524994244bb8d6e52f3b6bc771aa7980778f997a0b433d82b8753c99c/diff
lrwxrwxrwx 1 root root 72 Jul  8  2020 RZTDN446CCWTS2PMW4PWYZWNKE -> ../b01c078a8009cf9c33dd9777a08be00c4c4dc80818ca281fa20876bf85fa2859/diff
lrwxrwxrwx 1 root root 72 Jan 26  2021 SP6XONH3QG35ZPXNGLAJF5WJFC -> ../67198dc7968dba7dff12a081f48213a7910d241be51e40b53caa5a0fa9c93289/diff
lrwxrwxrwx 1 root root 72 Jul  7  2020 SYVSGYGUNEFPQQMNLVN3UYHLKR -> ../666847cb237f864f0ad1d1cce8df44f6ef476a27bbb322f22f50f58d2edc9748/diff
lrwxrwxrwx 1 root root 72 Jul 29  2020 UXLQRWJTHWPDN5B7H3WHKKUTRO -> ../2145033041d78c3999398299f73811c023a39f42f72ecdd0902f042ec1bac65a/diff
lrwxrwxrwx 1 root root 72 Sep 29  2020 UZ366QUYMRCUEIGD7S22GVFPDW -> ../5a1d68245a00a2592a454b717040203e24c421ffb1cf40a9c3b5d025f6aeed9c/diff
lrwxrwxrwx 1 root root 72 Jun  4 12:30 V6XRRY7UGKZUTP5KEXQFSQH4RA -> ../33642c9c96ce69e0236efc7ffe93d8055ebe7432ecbdd87d0366f06a3e86f319/diff
lrwxrwxrwx 1 root root 77 Nov  4  2020 V77JD7UNQKAINIZG2XRDOX2SZR -> ../f859bc1f9b6198b7fdeb2b6d02fbf8b6719b76b368c5a63c799703e750bce9d7-init/diff
lrwxrwxrwx 1 root root 72 Sep  7  2020 VFWIMQ2VOF5LEXGX6L5EDSCVSQ -> ../df073ee3ed112da4b90dc7be4aa71be14fe8d299ee0f5bb047c2ab0cc83197d8/diff
lrwxrwxrwx 1 root root 77 Aug 25  2020 VU2PD3IWQUN2KWNGNN4XGJWWQG -> ../d6d000716076a857fbe6b44ead4ebb43b63045e4e8895590812d1a4af83bbfc0-init/diff
lrwxrwxrwx 1 root root 72 Mar  2  2021 WUT7WC62SF4ZL4ZIN5UXT6ABQU -> ../c738a5df635beb5f383c124f7f6546ca8be5dda7b7a6a3ad8cbd943a11bd695b/diff
lrwxrwxrwx 1 root root 72 Jul 29  2020 XCLFGFPSRK2KNHLYBTG5A7JQEO -> ../ee19000663fe679b572f13c1c374131b1c28b56f0b5b53a03a7b0c57a3f7e44d/diff
lrwxrwxrwx 1 root root 72 Jul  8  2020 XGZ5BSH7B3QABQTBGIQJGQALMU -> ../55fea579f0bb19cfe0a90aed45b419f733be016463af7b71e508db46ca7c47cb/diff
lrwxrwxrwx 1 root root 72 Jun  4 22:29 XTJS42LR2ZLHM5LYOQNQ3FMGVH -> ../35e5021ea38144100bd96eea0db1d789f61e02ae0b720f247da82d99f4a6d537/diff
lrwxrwxrwx 1 root root 72 Jan 11  2021 XVCY2PFJBROSDCWAI2UOCLNMNV -> ../aad5d22b5bffcc185a22cde3bb52207f75db3bd64d9d7dbc13dafae3d9fa9731/diff
lrwxrwxrwx 1 root root 72 Jul 27 22:01 XZPW2ZIRVHQU4IYHBQJY434RD4 -> ../34d6c83aab94b28fa88d333b27cdde624deb47e3a39b56517ecadcfe03760c9b/diff
lrwxrwxrwx 1 root root 72 Jan 14  2021 Y45XSY32PUV57XPHGH45FYDMAZ -> ../faee8617cc471964fb7d8eb018d251e8dab6957115381af001cf48316a4796b1/diff
lrwxrwxrwx 1 root root 72 Aug 25  2020 YBY3F3AVVIBHUETCVIYLAXOHSZ -> ../eab7af527e2955d7bf4092b596d4f653cce3edd525da6d0c53cb1d962c77899f/diff
lrwxrwxrwx 1 root root 72 Sep  8  2020 YPOOU4GZGIPUYJNEFM3GFJCRPF -> ../25bb5adab8e68d5d4c9bbff04447d8989e6b735058229964743dcd154d4128b5/diff
lrwxrwxrwx 1 root root 72 Jul 29  2020 YR4HAVQ3ZYWKONWWOEZ2CT6O2U -> ../f35abded511feae3fa08036e7e21c0f7d01efbf167a60dc6d879fd3162833436/diff
lrwxrwxrwx 1 root root 72 Jun  1 22:00 Z2FLVGHXQLWFTSUJC3B7IAT2MU -> ../c50325effea6c9ff80d07cc92b59cbe9e680062f443cf56ea624dce68f69d79d/diff
lrwxrwxrwx 1 root root 72 Dec 29  2020 Z6QYKBQRIRO2RDQNWVMSWW72CB -> ../a9ff13792252ab01503b054c5336c928d7537f7738cda3e50fa6e89c94ab4786/diff
lrwxrwxrwx 1 root root 72 Oct 20  2020 ZR2ZH54YRHRXKGZB77H47GUQGN -> ../c9179d7e49b1d9180ea2bcf33816762c464d767b48e665fd359fd0e7a459eb25/diff
lrwxrwxrwx 1 root root 72 Aug  5 22:10 ZXTMR5HZR6YX3WB3M7TKQ2Y4E2 -> ../67c69d4aa350bcfb57ccd150207114e8ae6c56b1decaa7d7b13243755a317bd6/diff

4、根据第3步的层次,一级一级的和第一步的结果对比查询,获得下面的路径才是JVM参数设置点,修改其-Xms和-Xmx参数即可

/var/lib/docker/overlay2/97e437947e2e73d7583b0e70584b52e0a7a9711fe84137bf5e56094b74b44690/diff/usr/share/elasticsearch/config/jvm.options

5、要重启容器才能生效,restart命令不行,要stop;start

Logo

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐