{"id":140,"date":"2026-10-18T15:07:59","date_gmt":"2026-10-18T15:07:59","guid":{"rendered":"https:\/\/nino.to\/insights\/2026\/10\/18\/xay-dung-duong-ong-cicd-github-actions-docker\/"},"modified":"2026-10-18T15:07:59","modified_gmt":"2026-10-18T15:07:59","slug":"xay-dung-duong-ong-cicd-github-actions-docker","status":"publish","type":"post","link":"https:\/\/nino.to\/vi\/insights\/xay-dung-duong-ong-cicd-github-actions-docker\/","title":{"rendered":"X\u00e2y D\u1ef1ng \u0110\u01b0\u1eddng \u1ed0ng CI\/CD T\u1ef1 \u0110\u1ed9ng V\u1edbi GitHub Actions V\u00e0 Docker: T\u1eeb Commit \u0110\u1ebfn Production Trong 5 Ph\u00fat"},"content":{"rendered":"<h2>S\u1ee9c m\u1ea1nh c\u1ee7a t\u1ef1 \u0111\u1ed9ng h\u00f3a \u0111\u01b0\u1eddng \u1ed1ng b\u00e0n giao<\/h2>\n<p>Vi\u1ec7c tri\u1ec3n khai th\u1ee7 c\u00f4ng b\u1eb1ng l\u1ec7nh SSH v\u00e0o m\u00e1y ch\u1ee7 ti\u1ec1m \u1ea9n nguy c\u01a1 sai s\u00f3t cao v\u00e0 t\u1ea1o ra \u0111i\u1ec3m ngh\u1ebdn cho c\u1ea3 \u0111\u1ed9i ng\u0169 ph\u00e1t tri\u1ec3n. \u0110\u01b0\u1eddng \u1ed1ng CI\/CD chu\u1ea9n gi\u00fap lo\u1ea1i b\u1ecf ho\u00e0n to\u00e0n y\u1ebfu t\u1ed1 c\u1ea3m t\u00ednh c\u1ee7a con ng\u01b0\u1eddi.<\/p>\n<h2>Quy chu\u1ea9n \u0111\u01b0\u1eddng \u1ed1ng CI\/CD hi\u1ec7n \u0111\u1ea1i<\/h2>\n<ul>\n<li>Ch\u1ea1y ki\u1ec3m th\u1eed \u0111\u01a1n v\u1ecb (Unit Tests) v\u00e0 ki\u1ec3m tra \u0111\u1ecbnh d\u1ea1ng m\u00e3 ngu\u1ed3n (Linter) ngay khi t\u1ea1o Pull Request.<\/li>\n<li>\u0110\u00f3ng g\u00f3i Docker image nhi\u1ec1u giai \u0111o\u1ea1n (Multi-stage Build) \u0111\u1ec3 t\u1ed1i \u01b0u k\u00edch th\u01b0\u1edbc image d\u01b0\u1edbi 100MB.<\/li>\n<li>\u00c1p d\u1ee5ng chi\u1ebfn l\u01b0\u1ee3c tri\u1ec3n khai Blue-Green ho\u1eb7c Canary \u0111\u1ec3 ki\u1ec3m tra t\u00ednh \u1ed5n \u0111\u1ecbnh tr\u00ean 5% ng\u01b0\u1eddi d\u00f9ng tr\u01b0\u1edbc khi ph\u00e1t h\u00e0nh to\u00e0n di\u1ec7n.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>Quy tr\u00ecnh ki\u1ec3m th\u1eed t\u1ef1 \u0111\u1ed9ng, qu\u00e9t l\u1ed7 h\u1ed5ng b\u1ea3o m\u1eadt container v\u00e0 \u0111\u1ea9y m\u00e3 l\u00ean c\u1ee5m m\u00e1y ch\u1ee7 s\u1ea3n xu\u1ea5t gi\u00fap \u0111\u1ed9i ng\u0169 ph\u00e1t tri\u1ec3n ph\u00e1t h\u00e0nh phi\u00ean b\u1ea3n m\u1edbi h\u00e0ng ch\u1ee5c l\u1ea7n m\u1ed7i ng\u00e0y.<\/p>\n","protected":false},"author":1,"featured_media":141,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_gspb_post_css":"","footnotes":""},"categories":[23],"tags":[32,43,25,24,42],"class_list":["post-140","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cloud-security","tag-bao-mat-dam-may","tag-enterprise","tag-insights","tag-nino","tag-tech"],"_links":{"self":[{"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/posts\/140","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/comments?post=140"}],"version-history":[{"count":0,"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/posts\/140\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/media\/141"}],"wp:attachment":[{"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/media?parent=140"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/categories?post=140"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/nino.to\/vi\/insights\/wp-json\/wp\/v2\/tags?post=140"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}