{"id":85117,"date":"2025-04-05T23:32:03","date_gmt":"2025-04-05T16:32:03","guid":{"rendered":"https:\/\/itviecblog.uptech.vn\/?p=85117"},"modified":"2025-06-17T09:35:36","modified_gmt":"2025-06-17T02:35:36","slug":"elasticsearch-docker-la-gi","status":"publish","type":"post","link":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/","title":{"rendered":"Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3"},"content":{"rendered":"<div id=\"ez-toc-container\" class=\"ez-toc-v2_0_85 counter-hierarchy ez-toc-counter ez-toc-grey ez-toc-container-direction\">\n<div class=\"ez-toc-title-container\">\n<p class=\"ez-toc-title\" style=\"cursor:inherit\">N\u1ed9i dung b\u00e0i vi\u1ebft<\/p>\n<span class=\"ez-toc-title-toggle\"><a href=\"#\" class=\"ez-toc-pull-right ez-toc-btn ez-toc-btn-xs ez-toc-btn-default ez-toc-toggle\" aria-label=\"Toggle Table of Content\"><span class=\"ez-toc-js-icon-con\"><span class=\"\"><span class=\"eztoc-hide\" style=\"display:none;\">Toggle<\/span><span class=\"ez-toc-icon-toggle-span\"><svg style=\"fill: #999;color:#999\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" class=\"list-377408\" width=\"20px\" height=\"20px\" viewBox=\"0 0 24 24\" fill=\"none\"><path d=\"M6 6H4v2h2V6zm14 0H8v2h12V6zM4 11h2v2H4v-2zm16 0H8v2h12v-2zM4 16h2v2H4v-2zm16 0H8v2h12v-2z\" fill=\"currentColor\"><\/path><\/svg><svg style=\"fill: #999;color:#999\" class=\"arrow-unsorted-368013\" xmlns=\"http:\/\/www.w3.org\/2000\/svg\" width=\"10px\" height=\"10px\" viewBox=\"0 0 24 24\" version=\"1.2\" baseProfile=\"tiny\"><path d=\"M18.2 9.3l-6.2-6.3-6.2 6.3c-.2.2-.3.4-.3.7s.1.5.3.7c.2.2.4.3.7.3h11c.3 0 .5-.1.7-.3.2-.2.3-.5.3-.7s-.1-.5-.3-.7zM5.8 14.7l6.2 6.3 6.2-6.3c.2-.2.3-.5.3-.7s-.1-.5-.3-.7c-.2-.2-.4-.3-.7-.3h-11c-.3 0-.5.1-.7.3-.2.2-.3.5-.3.7s.1.5.3.7z\"\/><\/svg><\/span><\/span><\/span><\/a><\/span><\/div>\n<nav><ul class='ez-toc-list ez-toc-list-level-1 ' ><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-1\" href=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#Elasticsearch_Docker_la_gi\" >Elasticsearch Docker l\u00e0 g\u00ec?<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-2\" href=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#Loi_ich_cua_viec_chay_Elasticsearch_tren_Docker\" >L\u1ee3i \u00edch c\u1ee7a vi\u1ec7c ch\u1ea1y Elasticsearch tr\u00ean Docker\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-3\" href=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#Chay_Elasticsearch_Docker_nhu_the_nao\" >Ch\u1ea1y Elasticsearch Docker nh\u01b0 th\u1ebf n\u00e0o?\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-4\" href=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#Luu_y_can_nho_de_chay_Elasticsearch_tren_Docker_tot_nhat\" >L\u01b0u \u00fd c\u1ea7n nh\u1edb \u0111\u1ec3 ch\u1ea1y Elasticsearch tr\u00ean Docker t\u1ed1t nh\u1ea5t\u00a0<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-5\" href=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#Cau_hoi_thuong_gap_ve_Elasticsearch_Docker\" >C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 Elasticsearch Docker<\/a><\/li><li class='ez-toc-page-1 ez-toc-heading-level-2'><a class=\"ez-toc-link ez-toc-heading-6\" href=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#Tong_ket\" >T\u1ed5ng k\u1ebft<\/a><\/li><\/ul><\/nav><\/div>\n<p><em><strong>Trong th\u1eddi \u0111\u1ea1i d\u1eef li\u1ec7u b\u00f9ng n\u1ed5, Elasticsearch l\u00e0 c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd gi\u00fap t\u00ecm ki\u1ebfm v\u00e0 ph\u00e2n t\u00edch d\u1eef li\u1ec7u nhanh ch\u00f3ng. Tuy nhi\u00ean, vi\u1ec7c tri\u1ec3n khai Elasticsearch c\u00f3 th\u1ec3 ph\u1ee9c t\u1ea1p. Docker, v\u1edbi kh\u1ea3 n\u0103ng \u201ccontainer h\u00f3a\u201d d\u1eef li\u1ec7u, \u0111\u01b0\u1ee3c tin d\u00f9ng l\u00e0m gi\u1ea3i ph\u00e1p \u0111\u01a1n gi\u1ea3n v\u00e0 linh ho\u1ea1t. B\u00e0i vi\u1ebft n\u00e0y s\u1ebd h\u01b0\u1edbng d\u1eabn b\u1ea1n c\u00e1ch \u00e1p d\u1ee5ng Elasticsearch Docker \u0111\u1ec3 t\u1ed1i \u01b0u h\u00f3a qu\u00e1 tr\u00ecnh qu\u1ea3n l\u00fd d\u1eef li\u1ec7u.<\/strong><\/em><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ecdc b\u00e0i vi\u1ebft \u0111\u1ec3 hi\u1ec3u th\u00eam v\u1ec1:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Elasticsearch Docker l\u00e0 g\u00ec;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">L\u1ee3i \u00edch c\u1ee7a vi\u1ec7c ch\u1ea1y Elasticsearch tr\u00ean Docker;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">H\u01b0\u1edbng d\u1eabn c\u00e1ch ch\u1ea1y Elasticsearch Docker;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">L\u01b0u \u00fd gi\u00fap ch\u1ea1y Elasticsearch tr\u00ean Docker hi\u1ec7u qu\u1ea3;<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">C\u00e1c c\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 Elasticsearch Docker.<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Elasticsearch_Docker_la_gi\"><\/span><b>Elasticsearch Docker l\u00e0 g\u00ec?<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\"><a href=\"\/blog\/elasticsearch-la-gi\/\" target=\"_blank\" rel=\"noopener\"><strong>Elasticsearch<\/strong><\/a> l\u00e0 c\u00f4ng c\u1ee5 t\u00ecm ki\u1ebfm v\u00e0 ph\u00e2n t\u00edch m\u00e3 ngu\u1ed3n m\u1edf, c\u00f3 kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng theo chi\u1ec1u ngang, \u0111\u1ed9 tin c\u1eady v\u00e0 qu\u1ea3n l\u00fd d\u1ec5 d\u00e0ng. Elasticsearch t\u0103ng t\u1ed1c \u0111\u1ed9 t\u00ecm ki\u1ebfm, cung c\u1ea5p ph\u00e2n t\u00edch th\u1eddi gian th\u1ef1c v\u00e0 x\u1eed l\u00fd nhi\u1ec1u lo\u1ea1i d\u1eef li\u1ec7u kh\u00e1c nhau.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Docker l\u00e0 n\u1ec1n t\u1ea3ng t\u1ef1 \u0111\u1ed9ng h\u00f3a vi\u1ec7c tri\u1ec3n khai, m\u1edf r\u1ed9ng v\u00e0 qu\u1ea3n l\u00fd c\u00e1c \u1ee9ng d\u1ee5ng b\u1eb1ng c\u00e1ch s\u1eed d\u1ee5ng container. Docker container l\u00e0 m\u1ed9t \u0111\u01a1n v\u1ecb ph\u1ea7n m\u1ec1m ti\u00eau chu\u1ea9n \u0111\u00f3ng g\u00f3i m\u00e3 ngu\u1ed3n v\u00e0 t\u1ea5t c\u1ea3 c\u00e1c dependency c\u1ee7a n\u00f3 \u0111\u1ec3 \u1ee9ng d\u1ee5ng ch\u1ea1y nhanh v\u00e0 \u0111\u00e1ng tin c\u1eady trong m\u00f4i tr\u01b0\u1eddng \u0111i\u1ec7n to\u00e1n kh\u00e1c nhau.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Elasticsearch Docker ho\u1ea1t \u0111\u1ed9ng b\u1eb1ng c\u00e1ch ch\u1ea1y Elasticsearch b\u00ean trong m\u1ed9t Docker container, k\u1ebft h\u1ee3p kh\u1ea3 n\u0103ng t\u00ecm ki\u1ebfm v\u00e0 ph\u00e2n t\u00edch hi\u1ec7u qu\u1ea3 c\u1ee7a Elasticsearch v\u1edbi t\u00ednh linh ho\u1ea1t v\u00e0 d\u1ec5 s\u1eed d\u1ee5ng do Docker cung c\u1ea5p. Ch\u1ea1y Elasticsearch tr\u00ean Docker cho ph\u00e9p Developer t\u00e1ch bi\u1ec7t Elasticsearch kh\u1ecfi c\u00e1c \u1ee9ng d\u1ee5ng kh\u00e1c, ki\u1ec3m so\u00e1t vi\u1ec7c ph\u00e2n b\u1ed5 t\u00e0i nguy\u00ean, \u0111\u01a1n gi\u1ea3n h\u00f3a qu\u00e1 tr\u00ecnh tri\u1ec3n khai v\u00e0 qu\u1ea3n l\u00fd Elasticsearch. \u0110i\u1ec1u n\u00e0y \u0111\u1eb7c bi\u1ec7t h\u1eefu \u00edch \u0111\u1ec3 t\u1ea1o ra c\u00e1c m\u00f4i tr\u01b0\u1eddng c\u00f3 th\u1ec3 d\u1ef1 \u0111o\u00e1n, t\u00e1i t\u1ea1o, d\u1ec5 b\u1ea3o tr\u00ec v\u00e0 m\u1edf r\u1ed9ng quy m\u00f4.<\/span><\/p>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"\/blog\/huong-dan-elasticsearch-tutorial\/\" target=\"_blank\" rel=\"noopener\"><strong>Elasticsearch tutorial: Chi ti\u1ebft c\u00e1ch s\u1eed d\u1ee5ng Elasticsearch c\u01a1 b\u1ea3n<\/strong><\/a><\/em><\/p><\/blockquote>\n<h2><span class=\"ez-toc-section\" id=\"Loi_ich_cua_viec_chay_Elasticsearch_tren_Docker\"><\/span><b>L\u1ee3i \u00edch c\u1ee7a vi\u1ec7c ch\u1ea1y Elasticsearch tr\u00ean Docker<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Docker gi\u00fap thi\u1ebft l\u1eadp v\u00e0 ch\u1ea1y d\u1ecbch v\u1ee5 Elasticsearch \u0111\u1ea7y \u0111\u1ee7 ch\u1ee9c n\u0103ng ch\u1ec9 trong v\u00e0i ph\u00fat m\u00e0 kh\u00f4ng c\u1ea7n ph\u1ea3i lo l\u1eafng v\u1ec1 c\u00e1c quy tr\u00ecnh thi\u1ebft l\u1eadp ph\u1ee9c t\u1ea1p ho\u1eb7c c\u00e1c v\u1ea5n \u0111\u1ec1 v\u1ec1 kh\u1ea3 n\u0103ng t\u01b0\u01a1ng th\u00edch.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Docker kh\u00f4ng y\u00eau c\u1ea7u h\u1ec7 \u0111i\u1ec1u h\u00e0nh \u0111\u1ea7y \u0111\u1ee7 v\u00e0 c\u00f3 th\u1ec3 chia s\u1ebb t\u00e0i nguy\u00ean c\u1ee7a h\u1ec7 th\u1ed1ng l\u01b0u tr\u1eef, ngh\u0129a l\u00e0 b\u1ea1n c\u00f3 th\u1ec3 ch\u1ea1y nhi\u1ec1u phi\u00ean b\u1ea3n Elasticsearch tr\u00ean m\u1ed9t m\u00e1y ch\u1ee7 duy nh\u1ea5t. \u0110i\u1ec1u n\u00e0y cho ph\u00e9p b\u1ea1n t\u1eadn d\u1ee5ng t\u1ed1i \u0111a ph\u1ea7n c\u1ee9ng v\u00e0 c\u00f3 th\u1ec3 gi\u1ea3m chi ph\u00ed.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Docker cung c\u1ea5p m\u1ed9t m\u00f4i tr\u01b0\u1eddng bi\u1ec7t l\u1eadp cho d\u1ecbch v\u1ee5 Elasticsearch, c\u00f3 ngh\u0129a l\u00e0 d\u1ecbch v\u1ee5 Elasticsearch c\u1ee7a b\u1ea1n s\u1ebd kh\u00f4ng can thi\u1ec7p v\u00e0o c\u00e1c \u1ee9ng d\u1ee5ng kh\u00e1c v\u00e0 ng\u01b0\u1ee3c l\u1ea1i. S\u1ef1 bi\u1ec7t l\u1eadp n\u00e0y c\u0169ng l\u00e0m t\u0103ng t\u00ednh b\u1ea3o m\u1eadt v\u00ec n\u00f3 h\u1ea1n ch\u1ebf b\u1ec1 m\u1eb7t t\u1ea5n c\u00f4ng ti\u1ec1m \u1ea9n.<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Docker gi\u00fap b\u1ea1n d\u1ec5 d\u00e0ng m\u1edf r\u1ed9ng d\u1ecbch v\u1ee5 Elasticsearch b\u1eb1ng c\u00e1ch t\u1ea1o c\u00e1c Docker container m\u1edbi \u0111\u1ec3 x\u1eed l\u00fd kh\u1ed1i l\u01b0\u1ee3ng c\u00f4ng vi\u1ec7c t\u0103ng l\u00ean, \u0111\u00e1p \u1ee9ng c\u00e1c nhu c\u1ea7u kinh doanh khi ph\u00e1t tri\u1ec3n \u1ee9ng d\u1ee5ng. Ch\u1eb3ng h\u1ea1n nh\u01b0 khi l\u01b0u l\u01b0\u1ee3ng truy v\u1ea5n ho\u1eb7c d\u1eef li\u1ec7u t\u0103ng \u0111\u1ed9t bi\u1ebfn. \u0110i\u1ec1u n\u00e0y r\u1ea5t h\u1eefu \u00edch trong c\u00e1c h\u1ec7 th\u1ed1ng c\u1ea7n kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng theo nhu c\u1ea7u (scalability).<\/span><\/li>\n<\/ul>\n<h2><span class=\"ez-toc-section\" id=\"Chay_Elasticsearch_Docker_nhu_the_nao\"><\/span><b>Ch\u1ea1y Elasticsearch Docker nh\u01b0 th\u1ebf n\u00e0o?<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>C\u00e0i \u0111\u1eb7t Elasticsearch Docker<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Vi\u1ec7c t\u1ea3i Elasticsearch cho Docker c\u0169ng \u0111\u01a1n gi\u1ea3n nh\u01b0 vi\u1ec7c \u0111\u01b0a l\u1ec7nh <\/span><span style=\"font-weight: 400;\">docker pull <\/span><span style=\"font-weight: 400;\">v\u00e0o s\u1ed5 \u0111\u0103ng k\u00fd Elastic Docker.\u00a0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker pull <\/span><span style=\"font-weight: 400;\">docker.elastic.co\/elasticsearch\/elasticsearch:7.17.28<\/span><\/pre>\n<h3><b>B\u1eaft \u0111\u1ea7u m\u1ed9t single-node Elasticsearch cluster v\u1edbi Docker Compose<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 ph\u00e1t tri\u1ec3n ho\u1eb7c th\u1eed nghi\u1ec7m single-node Elasticsearch cluster, h\u00e3y ch\u1ec9 \u0111\u1ecbnh kh\u00e1m ph\u00e1 m\u1ed9t node \u0111\u1ec3 b\u1ecf qua c\u00e1c ki\u1ec3m tra kh\u1edfi \u0111\u1ed9ng:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker run -p 127.0.0.1:9200:9200 -p 127.0.0.1:9300:9300 -e \"discovery.type=single-node\" docker.elastic.co\/elasticsearch\/elasticsearch:7.17.28<\/span><\/pre>\n<h3><b>Kh\u1edfi \u0111\u1ed9ng m\u1ed9t multi-node cluster v\u1edbi Docker Compose<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 thi\u1ebft l\u1eadp v\u00e0 ch\u1ea1y three-node Elasticsearch cluster trong Docker, b\u1ea1n c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng Docker Compose \u0111\u1ec3 t\u1ea1o t\u1eadp tin <\/span><span style=\"font-weight: 400;\">docker-compose.yml<\/span><span style=\"font-weight: 400;\"> nh\u01b0 sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">version: '2.2'<\/span>\n\n<span style=\"font-weight: 400;\">services:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0es01:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0image: docker.elastic.co\/elasticsearch\/elasticsearch:7.17.28<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0container_name: es01<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0environment:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- node.name=es01<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- cluster.name=es-docker-cluster<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- discovery.seed_hosts=es02,es03<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- cluster.initial_master_nodes=es01,es02,es03<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- bootstrap.memory_lock=true<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- \"ES_JAVA_OPTS=-Xms512m -Xmx512m\"<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0ulimits:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0memlock:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0soft: -1<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0hard: -1<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0volumes:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- data01:\/usr\/share\/elasticsearch\/data<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0ports:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- 9200:9200<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0networks:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- elastic<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0es02:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0image: docker.elastic.co\/elasticsearch\/elasticsearch:7.17.28<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0container_name: es02<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0environment:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- node.name=es02<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- cluster.name=es-docker-cluster<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- discovery.seed_hosts=es01,es03<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- cluster.initial_master_nodes=es01,es02,es03<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- bootstrap.memory_lock=true<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- \"ES_JAVA_OPTS=-Xms512m -Xmx512m\"<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0ulimits:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0memlock:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0soft: -1<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0hard: -1<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0volumes:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- data02:\/usr\/share\/elasticsearch\/data<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0networks:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- elastic<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0es03:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0image: docker.elastic.co\/elasticsearch\/elasticsearch:7.17.28<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0container_name: es03<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0environment:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- node.name=es03<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- cluster.name=es-docker-cluster<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- discovery.seed_hosts=es01,es02<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- cluster.initial_master_nodes=es01,es02,es03<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- bootstrap.memory_lock=true<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- \"ES_JAVA_OPTS=-Xms512m -Xmx512m\"<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0ulimits:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0memlock:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0soft: -1<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0hard: -1<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0volumes:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- data03:\/usr\/share\/elasticsearch\/data<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0networks:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0- elastic<\/span>\n\n<span style=\"font-weight: 400;\">volumes:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0data01:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0driver: local<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0data02:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0driver: local<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0data03:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0driver: local<\/span>\n\n<span style=\"font-weight: 400;\">networks:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0elastic:<\/span>\n\n<span style=\"font-weight: 400;\">\u00a0\u00a0\u00a0\u00a0driver: bridge<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng l\u1ec7nh Docker \u0111\u1ec3 kh\u1edfi \u0111\u1ed9ng single-node Elasticsearch cluster nh\u1eb1m ph\u00e1t tri\u1ec3n ho\u1eb7c th\u1eed nghi\u1ec7m. Sau \u0111\u00f3, b\u1ea1n c\u00f3 th\u1ec3 ch\u1ea1y c\u00e1c l\u1ec7nh Docker b\u1ed5 sung \u0111\u1ec3 th\u00eam c\u00e1c node th\u1eed nghi\u1ec7m cluster ho\u1eb7c ch\u1ea1y Kibana.<\/span><\/p>\n<blockquote><p><span style=\"font-weight: 400;\">L\u01b0u \u00fd, thi\u1ebft l\u1eadp n\u00e0y kh\u00f4ng ch\u1ea1y multiple Elasticsearch node ho\u1eb7c Kibana theo m\u1eb7c \u0111\u1ecbnh. \u0110\u1ec3 t\u1ea1o multi-node cluster v\u1edbi Kibana, h\u00e3y s\u1eed d\u1ee5ng Docker Compose thay th\u1ebf. Xem c\u00e1ch kh\u1edfi ch\u1ea1y multi-node cluster v\u1edbi <\/span><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/docker.html#docker-compose-file\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Docker Compose<\/span><\/a><span style=\"font-weight: 400;\">.\u00a0<\/span><\/p><\/blockquote>\n<h3><b>T\u0103ng c\u01b0\u1eddng b\u1ea3o m\u1eadt Docker images<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u0169ng c\u00f3 th\u1ec3 s\u1eed d\u1ee5ng <\/span><a href=\"https:\/\/github.com\/wolfi-dev\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Wolfi<\/span><\/a><span style=\"font-weight: 400;\"> image \u0111\u1ec3 t\u0103ng c\u01b0\u1eddng b\u1ea3o m\u1eadt. Vi\u1ec7c s\u1eed d\u1ee5ng Wolfi image y\u00eau c\u1ea7u Docker phi\u00ean b\u1ea3n 20.10.10 ho\u1eb7c cao h\u01a1n. \u0110\u1ec3 s\u1eed d\u1ee5ng Wolfi image, h\u00e3y th\u00eam <\/span><span style=\"font-weight: 400;\">-wolfi<\/span><span style=\"font-weight: 400;\"> v\u00e0o tag image trong l\u1ec7nh Docker. V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker pull docker.elastic.co\/elasticsearch\/elasticsearch-wolfi:8.17.2<\/span><\/pre>\n<h3><b>C\u1ea5u h\u00ecnh v\u00e0 ch\u1ea1y Elasticsearch<\/b><\/h3>\n<h4><b>C\u00e0i \u0111\u1eb7t Docker<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Truy c\u1eadp <\/span><a href=\"https:\/\/docs.docker.com\/get-started\/get-docker\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Get Docker<\/span><\/a><span style=\"font-weight: 400;\"> \u0111\u1ec3 c\u00e0i \u0111\u1eb7t Docker cho m\u00f4i tr\u01b0\u1eddng c\u1ee7a b\u1ea1n. N\u1ebfu s\u1eed d\u1ee5ng Docker Desktop, h\u00e3y \u0111\u1ea3m b\u1ea3o ph\u00e2n b\u1ed5 \u00edt nh\u1ea5t 4GB b\u1ed9 nh\u1edb. B\u1ea1n c\u00f3 th\u1ec3 \u0111i\u1ec1u ch\u1ec9nh m\u1ee9c s\u1eed d\u1ee5ng b\u1ed9 nh\u1edb trong Docker Desktop b\u1eb1ng c\u00e1ch v\u00e0o <\/span><b>Settings &gt; Resources<\/b><span style=\"font-weight: 400;\">.<\/span><\/p>\n<h4><b>T\u1ea1o m\u1ed9t m\u1ea1ng docker m\u1edbi<\/b><\/h4>\n<pre><span style=\"font-weight: 400;\">docker network create elastic<\/span><\/pre>\n<h4><b>Pull Elasticsearch Docker image<\/b><\/h4>\n<pre><span style=\"font-weight: 400;\">docker pull docker.elastic.co\/elasticsearch\/elasticsearch:8.17.2<\/span><\/pre>\n<p><b>T\u00f9y ch\u1ecdn: <\/b><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng <\/span><a href=\"https:\/\/docs.sigstore.dev\/cosign\/system_config\/installation\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">Cosign<\/span><\/a><span style=\"font-weight: 400;\"> \u0111\u1ec3 x\u00e1c minh ch\u1eef k\u00fd c\u1ee7a Elasticsearch image.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">wget https:\/\/artifacts.elastic.co\/cosign.pub\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">cosign verify --key cosign.pub docker.elastic.co\/elasticsearch\/elasticsearch:8.17.2<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">L\u1ec7nh <\/span><span style=\"font-weight: 400;\">cosign<\/span><span style=\"font-weight: 400;\"> cho ra k\u1ebft qu\u1ea3 ki\u1ec3m tra v\u00e0 n\u1ed9i dung ch\u1eef k\u00fd theo \u0111\u1ecbnh d\u1ea1ng JSON:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">Verification for docker.elastic.co\/elasticsearch\/elasticsearch:8.17.2 --\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">The following checks were performed on each of these signatures:\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">- The cosign claims were validated\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">- Existence of the claims in the transparency log was verified offline\u00a0<\/span>\n\n<span style=\"font-weight: 400;\">- The signatures were verified against the specified public key<\/span><\/pre>\n<h4><b>Kh\u1edfi \u0111\u1ed9ng m\u1ed9t Elasticsearch container<\/b><\/h4>\n<pre><span style=\"font-weight: 400;\">docker run --name es01 --net elastic -p 9200:9200 -it -m 1GB docker.elastic.co\/elasticsearch\/elasticsearch:8.17.2<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">C\u00e1c t\u00ednh n\u0103ng Machine learning nh\u01b0 <\/span><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/semantic-search-elser.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">t\u00ecm ki\u1ebfm ng\u1eef ngh\u0129a v\u1edbi ELSER<\/span><\/a><span style=\"font-weight: 400;\"> y\u00eau c\u1ea7u m\u1ed9t container l\u1edbn h\u01a1n v\u1edbi\u00a0 b\u1ed9 nh\u1edb h\u01a1n 1GB. N\u1ebfu b\u1ea1n \u0111\u1ecbnh s\u1eed d\u1ee5ng c\u00e1c kh\u1ea3 n\u0103ng h\u1ecdc m\u00e1y, h\u00e3y kh\u1edfi \u0111\u1ed9ng container b\u1eb1ng l\u1ec7nh n\u00e0y:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker run --name es01 --net elastic -p 9200:9200 -it -m 6GB -e \"xpack.ml.use_auto_machine_memory_percent=true\" docker.elastic.co\/elasticsearch\/elasticsearch:8.17.2<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">L\u1ec7nh n\u00e0y s\u1ebd print ra m\u1eadt kh\u1ea9u ng\u01b0\u1eddi d\u00f9ng <\/span><span style=\"font-weight: 400;\">elastic<\/span><span style=\"font-weight: 400;\"> v\u00e0 m\u00e3 th\u00f4ng b\u00e1o \u0111\u0103ng k\u00fd cho Kibana.<\/span><\/p>\n<h4><b>Sao ch\u00e9p m\u1eadt kh\u1ea9u <\/b><b>elastic<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Sao ch\u00e9p m\u1eadt kh\u1ea9u elastic \u0111\u00e3 t\u1ea1o v\u00e0 m\u00e3 th\u00f4ng b\u00e1o \u0111\u0103ng k\u00fd. C\u00e1c th\u00f4ng tin x\u00e1c th\u1ef1c n\u00e0y ch\u1ec9 \u0111\u01b0\u1ee3c hi\u1ec3n th\u1ecb khi b\u1ea1n kh\u1edfi \u0111\u1ed9ng Elasticsearch l\u1ea7n \u0111\u1ea7u ti\u00ean. B\u1ea1n c\u00f3 th\u1ec3 t\u1ea1o l\u1ea1i th\u00f4ng tin x\u00e1c th\u1ef1c b\u1eb1ng c\u00e1c l\u1ec7nh sau:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker exec -it es01 \/usr\/share\/elasticsearch\/bin\/elasticsearch-reset-password -u elastic<\/span>\n\n<span style=\"font-weight: 400;\">docker exec -it es01 \/usr\/share\/elasticsearch\/bin\/elasticsearch-create-enrollment-token -s kibana<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">B\u1ea1n n\u00ean l\u01b0u tr\u1eef m\u1eadt kh\u1ea9u <\/span><span style=\"font-weight: 400;\">elastic<\/span><span style=\"font-weight: 400;\"> d\u01b0\u1edbi d\u1ea1ng bi\u1ebfn m\u00f4i tr\u01b0\u1eddng trong shell. V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">export ELASTIC_PASSWORD=\"your_password\"<\/span><\/pre>\n<h4><b>Sao ch\u00e9p ch\u1ee9ng ch\u1ec9 SSL <\/b><b>http_ca.crt<\/b><\/h4>\n<p><span style=\"font-weight: 400;\">Sao ch\u00e9p ch\u1ee9ng ch\u1ec9 SSL http_ca.crt t\u1eeb container v\u00e0o local machine c\u1ee7a b\u1ea1n.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker cp es01:\/usr\/share\/elasticsearch\/config\/certs\/http_ca.crt .<\/span><\/pre>\n<p><b>Th\u1ef1c hi\u1ec7n l\u1ec7nh g\u1ecdi REST API t\u1edbi Elasticsearch<\/b><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 \u0111\u1ea3m b\u1ea3o Elasticsearch container \u0111ang ch\u1ea1y:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https:\/\/localhost:9200<\/span><\/pre>\n<h3><b>Th\u00eam nhi\u1ec1u node h\u01a1n<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">S\u1eed d\u1ee5ng m\u1ed9t node hi\u1ec7n c\u00f3 \u0111\u1ec3 t\u1ea1o m\u00e3 th\u00f4ng b\u00e1o \u0111\u0103ng k\u00fd cho node m\u1edbi.<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker exec -it es01 \/usr\/share\/elasticsearch\/bin\/elasticsearch-create-enrollment-token -s node<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">M\u00e3 th\u00f4ng b\u00e1o \u0111\u0103ng k\u00fd c\u00f3 hi\u1ec7u l\u1ef1c trong 30 ph\u00fat.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1eaft \u0111\u1ea7u 1 container Elasticsearch m\u1edbi, bao g\u1ed3m m\u00e3 th\u00f4ng b\u00e1o \u0111\u0103ng k\u00fd l\u00e0m bi\u1ebfn m\u00f4i tr\u01b0\u1eddng:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker run -e ENROLLMENT_TOKEN=\"&lt;token&gt;\" --name es02 --net elastic -it -m 1GB docker.elastic.co\/elasticsearch\/elasticsearch:8.17.2<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">G\u1ecdi <\/span><a href=\"https:\/\/www.elastic.co\/guide\/en\/elasticsearch\/reference\/current\/cat-nodes.html\" target=\"_blank\" rel=\"noopener\"><span style=\"font-weight: 400;\">cat nodes API<\/span><\/a><span style=\"font-weight: 400;\"> \u0111\u1ec3 x\u00e1c minh node m\u1edbi \u0111\u00e3 \u0111\u01b0\u1ee3c th\u00eam v\u00e0o cluster:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">curl --cacert http_ca.crt -u elastic:$ELASTIC_PASSWORD https:\/\/localhost:9200\/_cat\/nodes<\/span><\/pre>\n<h3><b>Ch\u1ea1y Kibana<\/b><\/h3>\n<h4><strong>Pull Kibana Docker image<\/strong><\/h4>\n<pre><span style=\"font-weight: 400;\">docker pull docker.elastic.co\/kibana\/kibana:8.17.2<\/span><\/pre>\n<h4><span style=\"font-weight: 400;\"><strong>T\u00f9y ch\u1ecdn: X\u00e1c minh ch\u1eef k\u00fd c\u1ee7a Kibana image<\/strong><\/span><\/h4>\n<pre><span style=\"font-weight: 400;\">wget https:\/\/artifacts.elastic.co\/cosign.pub<\/span>\n\n<span style=\"font-weight: 400;\">cosign verify --key cosign.pub docker.elastic.co\/kibana\/kibana:8.17.2<\/span><\/pre>\n<h4><strong>Kh\u1edfi \u0111\u1ed9ng Kibana container<\/strong><\/h4>\n<pre><span style=\"font-weight: 400;\">docker run --name kib01 --net elastic -p 5601:5601 docker.elastic.co\/kibana\/kibana:8.17.2<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">Kibana c\u00f3 th\u1ec3 m\u1ea5t v\u00e0i ph\u00fat \u0111\u1ec3 k\u1ebft n\u1ed1i v\u1edbi Elasticsearch. N\u1ebfu g\u1eb7p l\u1ed7i khi truy c\u1eadp, \u0111\u1ee3i 1-2 ph\u00fat r\u1ed3i th\u1eed l\u1ea1i. Xem log Kibana b\u1eb1ng: docker logs kib01 \u0111\u1ec3 ki\u1ec3m tra tr\u1ea1ng th\u00e1i.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Khi Kibana kh\u1edfi \u0111\u1ed9ng s\u1ebd t\u1ea1o ra m\u1ed9t li\u00ean k\u1ebft duy nh\u1ea5t \u0111\u1ebfn terminal. \u0110\u1ec3 truy c\u1eadp Kibana, h\u00e3y m\u1edf li\u00ean k\u1ebft n\u00e0y trong tr\u00ecnh duy\u1ec7t web.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Trong tr\u00ecnh duy\u1ec7t c\u1ee7a b\u1ea1n, h\u00e3y nh\u1eadp m\u00e3 th\u00f4ng b\u00e1o \u0111\u0103ng k\u00fd \u0111\u01b0\u1ee3c t\u1ea1o khi b\u1ea1n kh\u1edfi \u0111\u1ed9ng Elasticsearch. \u0110\u1ec3 t\u1ea1o l\u1ea1i m\u00e3 th\u00f4ng b\u00e1o, h\u00e3y ch\u1ea1y:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker exec -it es01 \/usr\/share\/elasticsearch\/bin\/elasticsearch-create-enrollment-token -s kibana<\/span><\/pre>\n<p><span style=\"font-weight: 400;\">\u0110\u0103ng nh\u1eadp v\u1edbi t\u01b0 c\u00e1ch ng\u01b0\u1eddi d\u00f9ng <\/span><span style=\"font-weight: 400;\">elastic<\/span><span style=\"font-weight: 400;\"> v\u1edbi m\u1eadt kh\u1ea9u \u0111\u01b0\u1ee3c t\u1ea1o khi b\u1ea1n kh\u1edfi \u0111\u1ed9ng Elasticsearch. \u0110\u1ec3 t\u1ea1o l\u1ea1i m\u1eadt kh\u1ea9u, h\u00e3y ch\u1ea1y:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker exec -it es01 \/usr\/share\/elasticsearch\/bin\/elasticsearch-reset-password -u elastic<\/span><\/pre>\n<h3><b>X\u00f3a container<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 x\u00f3a container v\u00e0 network c\u1ee7a ch\u00fang, b\u1ea1n ch\u1ea1y:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\"># \u0110i\u1ec1u n\u00e0y tr\u00e1nh l\u1ed7i khi x\u00f3a container \u0111ang ch\u1ea1y<\/span>\n<span style=\"font-weight: 400;\">docker stop es01 es02 kib01<\/span>\n\n<span style=\"font-weight: 400;\"># Lo\u1ea1i b\u1ecf Elastic network<\/span>\n\n<span style=\"font-weight: 400;\">docker network rm elastic<\/span>\n\n<span style=\"font-weight: 400;\"># Lo\u1ea1i b\u1ecf Elasticsearch containers<\/span>\n\n<span style=\"font-weight: 400;\">docker rm es01<\/span>\n\n<span style=\"font-weight: 400;\">docker rm es02<\/span>\n\n<span style=\"font-weight: 400;\"># Lo\u1ea1i b\u1ecf Kibana container<\/span>\n\n<span style=\"font-weight: 400;\">docker rm kib01<\/span><\/pre>\n<h2><span class=\"ez-toc-section\" id=\"Luu_y_can_nho_de_chay_Elasticsearch_tren_Docker_tot_nhat\"><\/span><b>L\u01b0u \u00fd c\u1ea7n nh\u1edb \u0111\u1ec3 ch\u1ea1y Elasticsearch tr\u00ean Docker t\u1ed1t nh\u1ea5t<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>Thi\u1ebft l\u1eadp b\u1ed9 nh\u1edb<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Elasticsearch s\u1eed d\u1ee5ng r\u1ea5t nhi\u1ec1u b\u1ed9 nh\u1edb, \u0111\u1eb7c bi\u1ec7t l\u00e0 khi x\u1eed l\u00fd c\u00e1c t\u1eadp d\u1eef li\u1ec7u l\u1edbn. Do \u0111\u00f3, \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o hi\u1ec7u su\u1ea5t, b\u1ea1n h\u00e3y:<\/span><\/p>\n<ul>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">Ph\u00e2n b\u1ed5 \u0111\u1ee7 b\u1ed9 nh\u1edb cho Docker container \u0111ang ch\u1ea1y Elasticsearch. N\u00ean ph\u00e2n b\u1ed5 \u00edt nh\u1ea5t 50% t\u1ed5ng RAM cho b\u1ed9 nh\u1edb heap c\u1ee7a Elasticsearch, nh\u01b0ng kh\u00f4ng qu\u00e1 32GB v\u00ec c\u00f3 th\u1ec3 khi\u1ebfn Elasticsearch ch\u1eadm l\u1ea1i do Java s\u1eed d\u1ee5ng c\u00e1c object pointers b\u1ecb n\u00e9n.\u00a0<\/span><\/li>\n<li style=\"font-weight: 400;\" aria-level=\"1\"><span style=\"font-weight: 400;\">\u0110i\u1ec1u quan tr\u1ecdng l\u00e0 Elasticsearch s\u1eed d\u1ee5ng b\u1ed9 nh\u1edb cho nhi\u1ec1u m\u1ee5c \u0111\u00edch h\u01a1n l\u00e0 ch\u1ec9 ri\u00eang heap. Do \u0111\u00f3, container ph\u1ea3i c\u00f3 nhi\u1ec1u b\u1ed9 nh\u1edb h\u01a1n k\u00edch th\u01b0\u1edbc heap.<\/span><\/li>\n<\/ul>\n<p><span style=\"font-weight: 400;\">Elasticsearch s\u1eed d\u1ee5ng heap (\u0111\u01b0\u1ee3c c\u1ea5u h\u00ecnh qua JVM options nh\u01b0 -Xms v\u00e0 -Xmx) v\u00e0 c\u1ea3 b\u1ed9 nh\u1edb ngo\u00e0i heap (off-heap) cho c\u00e1c m\u1ee5c \u0111\u00edch nh\u01b0 caching, buffer, ho\u1eb7c l\u01b0u tr\u1eef ch\u1ec9 m\u1ee5c. V\u00ec v\u1eady, t\u1ed5ng b\u1ed9 nh\u1edb container c\u1ea7n l\u1edbn h\u01a1n heap size, th\u01b0\u1eddng g\u1ea5p 1.5-2 l\u1ea7n, t\u00f9y v\u00e0o workload.<\/span><\/p>\n<h3><b>\u0110\u1ea3m b\u1ea3o t\u00ednh b\u1ec1n v\u1eefng c\u1ee7a d\u1eef li\u1ec7u<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">C\u00e1c Docker container l\u00e0 t\u1ea1m th\u1eddi, ngh\u0129a l\u00e0 ch\u00fang m\u1ea5t t\u1ea5t c\u1ea3 d\u1eef li\u1ec7u khi kh\u1edfi \u0111\u1ed9ng l\u1ea1i. \u0110i\u1ec1u n\u00e0y g\u00e2y ra v\u1ea5n \u0111\u1ec1 cho m\u1ed9t \u1ee9ng d\u1ee5ng s\u1eed d\u1ee5ng nhi\u1ec1u d\u1eef li\u1ec7u nh\u01b0 Elasticsearch. \u0110\u1ec3 \u0111\u1ea3m b\u1ea3o t\u00ednh b\u1ec1n v\u1eefng c\u1ee7a d\u1eef li\u1ec7u, b\u1ea1n n\u00ean l\u01b0u tr\u1eef d\u1eef li\u1ec7u c\u1ee7a m\u00ecnh trong c\u00e1c Docker volumes.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400;\">C\u00e1c Docker volumes l\u00e0 v\u00f9ng l\u01b0u tr\u1eef b\u1ec1n v\u1eefng t\u1ed3n t\u1ea1i \u0111\u1ed9c l\u1eadp v\u1edbi c\u00e1c container. Ngay c\u1ea3 khi b\u1ea1n d\u1eebng ho\u1eb7c x\u00f3a Elasticsearch container, d\u1eef li\u1ec7u c\u1ee7a b\u1ea1n v\u1eabn an to\u00e0n trong Docker volume.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">V\u00ed d\u1ee5:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">docker run --name es01 -v esdata:\/usr\/share\/elasticsearch\/data -m 4GB <\/span><span style=\"font-weight: 400;\">docker.elastic.co\/elasticsearch\/elasticsearch:8.17.2<\/span>\n<\/pre>\n<p><span style=\"font-weight: 400;\">D\u00f9ng docker volume create esdata \u0111\u1ec3 t\u1ea1o volume tr\u01b0\u1edbc, ho\u1eb7c ch\u1ec9 \u0111\u1ecbnh \u0111\u01b0\u1eddng d\u1eabn tuy\u1ec7t \u0111\u1ed1i nh\u01b0<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">-v \/path\/to\/data:\/usr\/share\/elasticsearch\/data<\/span><\/pre>\n<h3><b>Ph\u00e2n c\u1ee5m (clustering)<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Elasticsearch \u0111\u01b0\u1ee3c thi\u1ebft k\u1ebf \u0111\u1ec3 ho\u1ea1t \u0111\u1ed9ng trong m\u00f4i tr\u01b0\u1eddng cluster, n\u01a1i nhi\u1ec1u node h\u1ee3p t\u00e1c \u0111\u1ec3 ph\u00e2n ph\u1ed1i d\u1eef li\u1ec7u v\u00e0 kh\u1ed1i l\u01b0\u1ee3ng c\u00f4ng vi\u1ec7c. Thi\u1ebft k\u1ebf n\u00e0y r\u1ea5t c\u00f3 l\u1ee3i cho kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng v\u00e0 d\u1ef1 ph\u00f2ng. Tuy nhi\u00ean, v\u1eadn h\u00e0nh Elasticsearch cluster tr\u00ean Docker c\u00f3 th\u1ec3 l\u00e0 m\u1ed9t th\u00e1ch th\u1ee9c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u1ea7n \u0111\u1ea3m b\u1ea3o t\u1ea5t c\u1ea3 c\u00e1c Elasticsearch node trong Docker network c\u00f3 th\u1ec3 communicate v\u1edbi nhau. Docker c\u00f3 kh\u1ea3 n\u0103ng k\u1ebft n\u1ed1i m\u1ea1ng t\u00edch h\u1ee3p cho ph\u00e9p c\u00e1c container communicate tr\u00ean c\u00e1c m\u00e1y ch\u1ee7 kh\u00e1c nhau. Ngo\u00e0i ra, h\u00e3y s\u1eed d\u1ee5ng c\u01a1 ch\u1ebf discovery c\u1ee7a Elasticsearch \u0111\u1ec3 cho ph\u00e9p c\u00e1c node t\u00ecm th\u1ea5y nhau v\u00e0 t\u1ea1o th\u00e0nh m\u1ed9t cluster.<\/span><\/p>\n<h3><b>Gi\u1edbi h\u1ea1n t\u00e0i nguy\u00ean<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Docker cho ph\u00e9p b\u1ea1n \u0111\u1eb7t gi\u1edbi h\u1ea1n t\u00e0i nguy\u00ean tr\u00ean c\u00e1c container. T\u00ednh n\u0103ng n\u00e0y h\u1eefu \u00edch \u0111\u1ec3 \u0111\u1ea3m b\u1ea3o r\u1eb1ng Elasticsearch container c\u1ee7a b\u1ea1n kh\u00f4ng s\u1eed d\u1ee5ng h\u1ebft t\u00e0i nguy\u00ean h\u1ec7 th\u1ed1ng v\u00e0 \u1ea3nh h\u01b0\u1edfng \u0111\u1ebfn c\u00e1c \u1ee9ng d\u1ee5ng kh\u00e1c.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">B\u1ea1n c\u00f3 th\u1ec3 \u0111\u1eb7t gi\u1edbi h\u1ea1n cho CPU, b\u1ed9 nh\u1edb v\u00e0 \u0111\u0129a I\/O. \u0110\u1ed1i v\u1edbi Elasticsearch, \u0111i\u1ec1u c\u1ea7n thi\u1ebft l\u00e0 cung c\u1ea5p cho container \u0111\u1ee7 t\u00e0i nguy\u00ean \u0111\u1ec3 x\u1eed l\u00fd kh\u1ed1i l\u01b0\u1ee3ng c\u00f4ng vi\u1ec7c hi\u1ec7u qu\u1ea3. Tuy nhi\u00ean, h\u00e3y c\u1ea9n th\u1eadn kh\u00f4ng ph\u00e2n b\u1ed5 t\u1ea5t c\u1ea3 t\u00e0i nguy\u00ean cho Elasticsearch v\u00ec \u0111i\u1ec1u n\u00e0y c\u00f3 th\u1ec3 l\u00e0m c\u00e1c \u1ee9ng d\u1ee5ng kh\u00e1c b\u1ecb thi\u1ebfu h\u1ee5t.<\/span><\/p>\n<h3><b>Tr\u00e1nh d\u00f9ng &#8216;Docker exec&#8217; cho c\u00e1c t\u00e1c v\u1ee5 th\u01b0\u1eddng xuy\u00ean<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">&#8216;Docker exec&#8217; cho ph\u00e9p b\u1ea1n ch\u1ea1y l\u1ec7nh b\u00ean trong Docker container. M\u1eb7c d\u00f9 h\u1eefu \u00edch cho vi\u1ec7c g\u1ee1 l\u1ed7i, nh\u01b0ng kh\u00f4ng \u0111\u01b0\u1ee3c khuy\u1ebfn kh\u00edch cho c\u00e1c t\u00e1c v\u1ee5 th\u00f4ng th\u01b0\u1eddng.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ch\u1ea1y c\u00e1c t\u00e1c v\u1ee5 th\u01b0\u1eddng l\u1ec7 v\u1edbi &#8216;Docker exec&#8217; c\u00f3 th\u1ec3 d\u1eabn \u0111\u1ebfn s\u1ef1 c\u1ed1. V\u00ed d\u1ee5, n\u1ebfu b\u1ea1n s\u1eed d\u1ee5ng &#8216;Docker exec&#8217; \u0111\u1ec3 t\u1ea1o d\u1eef li\u1ec7u b\u00ean trong container, d\u1eef li\u1ec7u n\u00e0y s\u1ebd b\u1ecb m\u1ea5t khi container \u0111\u01b0\u1ee3c kh\u1edfi \u0111\u1ed9ng l\u1ea1i. Thay v\u00e0o \u0111\u00f3, h\u00e3y s\u1eed d\u1ee5ng c\u00e1c c\u01a1 ch\u1ebf t\u00edch h\u1ee3p c\u1ee7a Docker \u0111\u1ec3 duy tr\u00ec d\u1eef li\u1ec7u, ch\u1eb3ng h\u1ea1n nh\u01b0 Docker volumes.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Cau_hoi_thuong_gap_ve_Elasticsearch_Docker\"><\/span><b>C\u00e2u h\u1ecfi th\u01b0\u1eddng g\u1eb7p v\u1ec1 Elasticsearch Docker<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<h3><b>Elasticsearch Docker c\u00f3 mi\u1ec5n ph\u00ed kh\u00f4ng?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">B\u1ea3n d\u00f9ng th\u1eeb c\u1ee7a Elasticsearch Docker cung c\u1ea5p t\u1ea5t c\u1ea3 c\u00e1c t\u00ednh n\u0103ng c\u1ee7a Elasticsearch, bao g\u1ed3m RRF v\u00e0 ML Inference, th\u1eddi gian d\u00f9ng th\u1eed l\u00e0 30 ng\u00e0y.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Sau khi th\u1eddi gian d\u00f9ng th\u1eed h\u1ebft h\u1ea1n, b\u1ea1n s\u1ebd \u0111\u01b0\u1ee3c c\u1ea5p gi\u1ea5y ph\u00e9p c\u01a1 b\u1ea3n, mi\u1ec5n ph\u00ed v\u00f4 th\u1eddi h\u1ea1n, bao g\u1ed3m c\u00e1c t\u00ednh n\u0103ng t\u00ecm ki\u1ebfm, l\u1eadp ch\u1ec9 m\u1ee5c, ph\u00e2n c\u1ee5m, v\u00e0 b\u1ea3o m\u1eadt c\u01a1 b\u1ea3n (SSL, x\u00e1c th\u1ef1c). N\u1ebfu mu\u1ed1n gi\u1eef t\u00ednh n\u0103ng cao c\u1ea5p sau 30 ng\u00e0y, b\u1ea1n c\u1ea7n mua gi\u1ea5y ph\u00e9p t\u1eeb Elastic.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">\u0110\u1ec3 ki\u1ec3m tra tr\u1ea1ng th\u00e1i gi\u1ea5y ph\u00e9p, d\u00f9ng l\u1ec7nh:<\/span><\/p>\n<pre><span style=\"font-weight: 400;\">API: curl -X GET 'https:\/\/localhost:9200\/_license'<\/span><span style=\"font-weight: 400;\">.\u00a0<\/span><\/pre>\n<h3><b>T\u1ea1i sao c\u1ea7n c\u00f3 Docker?<\/b><\/h3>\n<p><span style=\"font-weight: 400;\">Docker mang \u0111\u1ebfn nhi\u1ec1u l\u1ee3i \u00edch cho ph\u00e1t tri\u1ec3n v\u00e0 tri\u1ec3n khai ph\u1ea7n m\u1ec1m bao g\u1ed3m kh\u1ea3 n\u0103ng m\u1edf r\u1ed9ng, t\u00ednh nh\u1ea5t qu\u00e1n, t\u00ednh di \u0111\u1ed9ng, t\u00ednh c\u00f4 l\u1eadp v\u00e0 hi\u1ec7u qu\u1ea3 t\u00e0i nguy\u00ean. Kh\u1ea3 n\u0103ng c\u00f4 l\u1eadp c\u00e1c dependency c\u1ee7a Docker cho ph\u00e9p m\u1ed7i container ch\u1ea1y trong b\u1ea5t k\u1ec3 m\u00f4i tr\u01b0\u1eddng n\u00e0o m\u1ed9t c\u00e1ch \u0111\u00e1ng tin c\u1eady.<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\"><br \/>\n<\/span><span style=\"font-weight: 400;\">V\u1edbi Elasticsearch, Docker gi\u00fap tri\u1ec3n khai nhanh single-node ho\u1eb7c multi-node cluster, \u0111\u1ea3m b\u1ea3o phi\u00ean b\u1ea3n Java v\u00e0 dependency nh\u1ea5t qu\u00e1n, v\u00e0 d\u1ec5 d\u00e0ng t\u00e1i t\u1ea1o m\u00f4i tr\u01b0\u1eddng tr\u00ean c\u00e1c m\u00e1y kh\u00e1c nhau. Tuy nhi\u00ean, Docker \u0111\u00f2i h\u1ecfi hi\u1ec3u bi\u1ebft c\u01a1 b\u1ea3n v\u1ec1 m\u1ea1ng v\u00e0 qu\u1ea3n l\u00fd container \u0111\u1ec3 t\u1eadn d\u1ee5ng t\u1ed1i \u0111a l\u1ee3i \u00edch.<\/span><\/p>\n<h3><b>Docker c\u00f3 ph\u1ea3i Virtual Machine kh\u00f4ng?<\/b><span style=\"font-weight: 400;\">\u00a0<\/span><\/h3>\n<p><span style=\"font-weight: 400;\">Kh\u00f4ng. Docker kh\u00f4ng ph\u1ea3i l\u00e0 Virtual Machine. S\u1ef1 kh\u00e1c bi\u1ec7t ch\u00ednh gi\u1eefa Docker v\u00e0 Virtual Machine n\u1eb1m \u1edf ki\u1ebfn \u200b\u200btr\u00fac c\u1ee7a ch\u00fang: Virtual Machine c\u00f3 host OS v\u00e0 guest OS b\u00ean trong m\u1ed7i Virtual Machine. Guest OS c\u00f3 th\u1ec3 l\u00e0 b\u1ea5t k\u1ef3 OS n\u00e0o, nh\u01b0 Linux ho\u1eb7c Windows, b\u1ea5t k\u1ec3 host OS n\u00e0o.<\/span><\/p>\n<p><span style=\"font-weight: 400;\">Ng\u01b0\u1ee3c l\u1ea1i, c\u00e1c Docker container l\u01b0u tr\u1eef tr\u00ean m\u1ed9t physical server duy nh\u1ea5t v\u1edbi host OS \u0111\u01b0\u1ee3c chia s\u1ebb gi\u1eefa ch\u00fang. Vi\u1ec7c chia s\u1ebb host OS gi\u1eefa c\u00e1c container l\u00e0m cho ch\u00fang nh\u1eb9 h\u01a1n v\u00e0 t\u0103ng th\u1eddi gian kh\u1edfi \u0111\u1ed9ng.<\/span><\/p>\n<h2><span class=\"ez-toc-section\" id=\"Tong_ket\"><\/span><b>T\u1ed5ng k\u1ebft<\/b><span class=\"ez-toc-section-end\"><\/span><\/h2>\n<p><span style=\"font-weight: 400;\">Elasticsearch Docker gi\u00fap \u0111\u01a1n gi\u1ea3n h\u00f3a tri\u1ec3n khai v\u00e0 qu\u1ea3n l\u00fd d\u1eef li\u1ec7u hi\u1ec7u qu\u1ea3 h\u01a1n. Docker mang \u0111\u1ebfn m\u00f4i tr\u01b0\u1eddng linh ho\u1ea1t, d\u1ec5 t\u00e1i t\u1ea1o v\u00e0 m\u1edf r\u1ed9ng. S\u1ef1 k\u1ebft h\u1ee3p n\u00e0y kh\u00f4ng ch\u1ec9 ti\u1ebft ki\u1ec7m th\u1eddi gian m\u00e0 c\u00f2n t\u1ed1i \u01b0u h\u00f3a c\u00f4ng vi\u1ec7c v\u1edbi Elasticsearch. Th\u1eed ngay Elasticsearch Docker \u0111\u1ec3 n\u00e2ng cao hi\u1ec7u qu\u1ea3 h\u1ec7 th\u1ed1ng d\u1eef li\u1ec7u c\u1ee7a b\u1ea1n!<\/span><\/p>\n<blockquote><p><em>\u0110\u1ecdc th\u00eam: <a href=\"\/blog\/elasticsearch-query-la-gi\/\" target=\"_blank\" rel=\"noopener\"><strong>Elasticsearch Query: Kh\u00e1m ph\u00e1 b\u00ed k\u00edp t\u00ecm ki\u1ebfm d\u1eef li\u1ec7u si\u00eau t\u1ed1c<\/strong><\/a><\/em><\/p><\/blockquote>\n","protected":false},"excerpt":{"rendered":"<p>Trong th\u1eddi \u0111\u1ea1i d\u1eef li\u1ec7u b\u00f9ng n\u1ed5, Elasticsearch l\u00e0 c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd gi\u00fap t\u00ecm ki\u1ebfm v\u00e0 ph\u00e2n t\u00edch d\u1eef li\u1ec7u nhanh ch\u00f3ng. Tuy nhi\u00ean, vi\u1ec7c tri\u1ec3n khai Elasticsearch c\u00f3 th\u1ec3 ph\u1ee9c t\u1ea1p. Docker, v\u1edbi kh\u1ea3 n\u0103ng \u201ccontainer h\u00f3a\u201d d\u1eef li\u1ec7u, \u0111\u01b0\u1ee3c tin d\u00f9ng l\u00e0m gi\u1ea3i ph\u00e1p \u0111\u01a1n gi\u1ea3n v\u00e0 linh ho\u1ea1t. B\u00e0i vi\u1ebft n\u00e0y [&hellip;]<\/p>\n","protected":false},"author":205,"featured_media":85755,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_gspb_post_css":"","footnotes":""},"categories":[109],"tags":[],"class_list":["post-85117","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-chuyen-mon-it"],"blocksy_meta":[],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.8 (Yoast SEO v27.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3 - ITviec Blog<\/title>\n<meta name=\"description\" content=\"T\u00ecm hi\u1ec3u chi ti\u1ebft c\u00e1ch ch\u1ea1y Elasticsearch Docker \u0111\u1ec3 t\u1ed1i \u01b0u qu\u1ea3n l\u00fd d\u1eef li\u1ec7u. \u00c1p d\u1ee5ng hi\u1ec7u qu\u1ea3 v\u1edbi c\u00e1c l\u01b0u \u00fd quan tr\u1ecdng v\u00e0 m\u1eb9o t\u1ed1i \u01b0u h\u1eefu \u00edch.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/\" \/>\n<meta property=\"og:locale\" content=\"vi_VN\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3\" \/>\n<meta property=\"og:description\" content=\"Trong th\u1eddi \u0111\u1ea1i d\u1eef li\u1ec7u b\u00f9ng n\u1ed5, Elasticsearch l\u00e0 c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd gi\u00fap t\u00ecm ki\u1ebfm v\u00e0 ph\u00e2n t\u00edch d\u1eef li\u1ec7u nhanh ch\u00f3ng. Tuy nhi\u00ean, vi\u1ec7c tri\u1ec3n khai Elasticsearch\" \/>\n<meta property=\"og:url\" content=\"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/\" \/>\n<meta property=\"og:site_name\" content=\"ITviec Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/ITviec\" \/>\n<meta property=\"article:published_time\" content=\"2025-04-05T16:32:03+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-06-17T02:35:36+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/04\/elasticsearch-docker-vippro-scaled.png\" \/>\n\t<meta property=\"og:image:width\" content=\"640\" \/>\n\t<meta property=\"og:image:height\" content=\"337\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"H\u00e0 My\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@ITviec\" \/>\n<meta name=\"twitter:site\" content=\"@ITviec\" \/>\n<meta name=\"twitter:label1\" content=\"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi\" \/>\n\t<meta name=\"twitter:data1\" content=\"H\u00e0 My\" \/>\n\t<meta name=\"twitter:label2\" content=\"\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc\" \/>\n\t<meta name=\"twitter:data2\" content=\"13 ph\u00fat\" \/>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3 - ITviec Blog","description":"T\u00ecm hi\u1ec3u chi ti\u1ebft c\u00e1ch ch\u1ea1y Elasticsearch Docker \u0111\u1ec3 t\u1ed1i \u01b0u qu\u1ea3n l\u00fd d\u1eef li\u1ec7u. \u00c1p d\u1ee5ng hi\u1ec7u qu\u1ea3 v\u1edbi c\u00e1c l\u01b0u \u00fd quan tr\u1ecdng v\u00e0 m\u1eb9o t\u1ed1i \u01b0u h\u1eefu \u00edch.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/","og_locale":"vi_VN","og_type":"article","og_title":"Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3","og_description":"Trong th\u1eddi \u0111\u1ea1i d\u1eef li\u1ec7u b\u00f9ng n\u1ed5, Elasticsearch l\u00e0 c\u00f4ng c\u1ee5 m\u1ea1nh m\u1ebd gi\u00fap t\u00ecm ki\u1ebfm v\u00e0 ph\u00e2n t\u00edch d\u1eef li\u1ec7u nhanh ch\u00f3ng. Tuy nhi\u00ean, vi\u1ec7c tri\u1ec3n khai Elasticsearch","og_url":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/","og_site_name":"ITviec Blog","article_publisher":"https:\/\/www.facebook.com\/ITviec","article_published_time":"2025-04-05T16:32:03+00:00","article_modified_time":"2025-06-17T02:35:36+00:00","og_image":[{"width":640,"height":337,"url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/04\/elasticsearch-docker-vippro-scaled.png","type":"image\/png"}],"author":"H\u00e0 My","twitter_card":"summary_large_image","twitter_creator":"@ITviec","twitter_site":"@ITviec","twitter_misc":{"\u0110\u01b0\u1ee3c vi\u1ebft b\u1edfi":"H\u00e0 My","\u01af\u1edbc t\u00ednh th\u1eddi gian \u0111\u1ecdc":"13 ph\u00fat"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#article","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/"},"author":{"name":"H\u00e0 My","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/7bd099db44e5079508c9b7e8c0161e3c"},"headline":"Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3","datePublished":"2025-04-05T16:32:03+00:00","dateModified":"2025-06-17T02:35:36+00:00","mainEntityOfPage":{"@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/"},"wordCount":3361,"publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"image":{"@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/04\/elasticsearch-docker-vippro-scaled.png","articleSection":["Chuy\u00ean m\u00f4n IT"],"inLanguage":"vi"},{"@type":"WebPage","@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/","url":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/","name":"Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3 - ITviec Blog","isPartOf":{"@id":"https:\/\/itviec.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#primaryimage"},"image":{"@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#primaryimage"},"thumbnailUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/04\/elasticsearch-docker-vippro-scaled.png","datePublished":"2025-04-05T16:32:03+00:00","dateModified":"2025-06-17T02:35:36+00:00","description":"T\u00ecm hi\u1ec3u chi ti\u1ebft c\u00e1ch ch\u1ea1y Elasticsearch Docker \u0111\u1ec3 t\u1ed1i \u01b0u qu\u1ea3n l\u00fd d\u1eef li\u1ec7u. \u00c1p d\u1ee5ng hi\u1ec7u qu\u1ea3 v\u1edbi c\u00e1c l\u01b0u \u00fd quan tr\u1ecdng v\u00e0 m\u1eb9o t\u1ed1i \u01b0u h\u1eefu \u00edch.","breadcrumb":{"@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#breadcrumb"},"inLanguage":"vi","potentialAction":[{"@type":"ReadAction","target":["https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/"]}]},{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#primaryimage","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/04\/elasticsearch-docker-vippro-scaled.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2025\/04\/elasticsearch-docker-vippro-scaled.png","width":640,"height":337,"caption":"elasticsearch docker - itviec blog"},{"@type":"BreadcrumbList","@id":"https:\/\/itviec.com\/blog\/elasticsearch-docker-la-gi\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Chuy\u00ean m\u00f4n IT","item":"https:\/\/itviec.com\/blog\/chuyen-mon-it\/"},{"@type":"ListItem","position":2,"name":"Elasticsearch Docker l\u00e0 g\u00ec? C\u00e1ch tri\u1ec3n khai nhanh v\u00e0 hi\u1ec7u qu\u1ea3"}]},{"@type":"WebSite","@id":"https:\/\/itviec.com\/blog\/#website","url":"https:\/\/itviec.com\/blog\/","name":"ITviec Blog","description":"IT Jobs &amp; People in Vietnam","publisher":{"@id":"https:\/\/itviec.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/itviec.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"vi"},{"@type":"Organization","@id":"https:\/\/itviec.com\/blog\/#organization","name":"ITviec","url":"https:\/\/itviec.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2018\/12\/itviec-black-square-facebook.png","width":1800,"height":1800,"caption":"ITviec"},"image":{"@id":"https:\/\/itviec.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/ITviec","https:\/\/x.com\/ITviec","https:\/\/www.linkedin.com\/company\/itviec","https:\/\/www.youtube.com\/channel\/UCYthAQ3bcGr57M_ag5gHDvQ"]},{"@type":"Person","@id":"https:\/\/itviec.com\/blog\/#\/schema\/person\/7bd099db44e5079508c9b7e8c0161e3c","name":"H\u00e0 My","image":{"@type":"ImageObject","inLanguage":"vi","@id":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/ha-my-author-e1709882319892-100x100.jpeg","url":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/ha-my-author-e1709882319892-100x100.jpeg","contentUrl":"https:\/\/itviec.com\/blog\/wp-content\/uploads\/2024\/03\/ha-my-author-e1709882319892-100x100.jpeg","caption":"H\u00e0 My"},"url":"https:\/\/itviec.com\/blog\/author\/ha-my\/"}]}},"_links":{"self":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/85117","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/users\/205"}],"replies":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/comments?post=85117"}],"version-history":[{"count":1,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/85117\/revisions"}],"predecessor-version":[{"id":88176,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/posts\/85117\/revisions\/88176"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media\/85755"}],"wp:attachment":[{"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/media?parent=85117"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/categories?post=85117"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/itviec.com\/blog\/wp-json\/wp\/v2\/tags?post=85117"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}