[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"content:legacy:page:\u002Fposts\u002Fdocker\u002Fdockerfile-templates":3,"content:legacy:navigation":1769,"content:legacy:surround:\u002Fposts\u002Fdocker\u002Fdockerfile-templates":2052,"content:related-articles:Some useful Dockerfile templates":2055},{"id":4,"title":5,"aside":6,"body":7,"categories":6,"category":1753,"description":1754,"duration":224,"extension":1755,"footer":6,"header":6,"icon":6,"image":1756,"main":6,"meta":1759,"navigation":6,"path":1760,"publishedAt":1761,"seo":1762,"sitemap":1763,"stem":1764,"tags":1765,"toc":6,"top":1767,"__hash__":1768},"content\u002Fposts\u002Fdocker\u002Fdockerfile-templates.md","Some useful Dockerfile templates",null,{"type":8,"value":9,"toc":1749},"minimark",[10,15,19,153,157,162,507,512,631,636,740,745,1146,1151,1268,1273,1399,1404,1537,1542,1745],[11,12,14],"h2",{"id":13},"what-is-a-good-dockerfile","What is a good Dockerfile?",[16,17,18],"p",{},"A Dockerfile is a text file that contains a set of instructions to build a Docker image. It defines the environment in which your application will run, including the base image, dependencies, and configuration settings. A good Dockerfile should be efficient, maintainable, and easy to understand. Here are some best practices for writing a good Dockerfile:",[20,21,22,46,52,62,74,80,90,107,117,127,133,143],"ul",{},[23,24,25,29,30,34,35,38,39,34,42,45],"li",{},[26,27,28],"strong",{},"Use a small base image",": Start with a minimal base image to reduce the size of your final image. For example, use ",[31,32,33],"code",{},"alpine"," or ",[31,36,37],{},"scratch"," instead of ",[31,40,41],{},"ubuntu",[31,43,44],{},"debian"," if possible.",[23,47,48,51],{},[26,49,50],{},"Use multi-stage builds",": If your application requires a build step, use multi-stage builds to separate the build environment from the runtime environment. This helps to keep the final image size small and reduces the attack surface.",[23,53,54,57,58,61],{},[26,55,56],{},"Minimize the number of layers",": Each instruction in a Dockerfile creates a new layer in the image. Combine related instructions into a single ",[31,59,60],{},"RUN"," command to reduce the number of layers and improve build performance.",[23,63,64,70,71,73],{},[26,65,66,67],{},"Use ",[31,68,69],{},".dockerignore",": Create a ",[31,72,69],{}," file to exclude unnecessary files and directories from being copied into the image. This helps to reduce the image size and build time.",[23,75,76,79],{},[26,77,78],{},"Use environment variables",": Use environment variables to configure your application and avoid hardcoding values in the Dockerfile. This makes it easier to change configurations without modifying the Dockerfile.",[23,81,82,85,86,89],{},[26,83,84],{},"Use explicit versioning",": Specify the exact version of dependencies in your Dockerfile to ensure consistent builds. Avoid using ",[31,87,88],{},"latest"," tags, as they can lead to unexpected changes in your application behavior.",[23,91,92,95,96,99,100,103,104,106],{},[26,93,94],{},"Use COPY instead of ADD",": Use the ",[31,97,98],{},"COPY"," instruction to copy files into the image instead of ",[31,101,102],{},"ADD",", unless you need to extract a tar file or download a remote file. ",[31,105,98],{}," is more explicit and avoids unnecessary complexity.",[23,108,109,112,113,116],{},[26,110,111],{},"Clean up after installation",": Remove unnecessary files and dependencies after installing packages to keep the image size small. Use ",[31,114,115],{},"apt-get clean"," or similar commands to clean up package manager caches.",[23,118,119,122,123,126],{},[26,120,121],{},"Use health checks",": Add a ",[31,124,125],{},"HEALTHCHECK"," instruction to your Dockerfile to monitor the health of your application. This helps to ensure that your application is running correctly and can be restarted if necessary.",[23,128,129,132],{},[26,130,131],{},"Document your Dockerfile",": Add comments to explain the purpose of each instruction in your Dockerfile. This makes it easier for others (and yourself) to understand the build process and maintain the Dockerfile in the future.",[23,134,135,138,139,142],{},[26,136,137],{},"Use a specific user",": Avoid running your application as the root user inside the container. Create a non-root user and switch to that user using the ",[31,140,141],{},"USER"," instruction. This improves security and reduces the risk of privilege escalation attacks.",[23,144,145,148,149,152],{},[26,146,147],{},"Use a specific working directory, entry point",": Set a specific working directory using the ",[31,150,151],{},"WORKDIR"," instruction. This helps to keep your application files organized and makes it easier to run commands inside the container.",[11,154,156],{"id":155},"templates","Templates",[16,158,159],{},[26,160,161],{},"1. Dockerfile NodeJS",[163,164,165,356],"code-group",{},[166,167,173],"pre",{"className":168,"code":169,"filename":170,"language":171,"meta":172,"style":172},"language-shell shiki shiki-themes github-light github-dark","  FROM node:18-alpine AS build\n  WORKDIR \u002Fapp\n  COPY package*.json .\u002F\n  RUN npm ci --only=production\n  COPY . .\n  RUN npm run build\n\n  FROM node:18-alpine\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Fapp\u002Fnode_modules .\u002Fnode_modules\n  COPY --from=build \u002Fapp .\n  ENV NODE_ENV=production\n  ENV PORT=3000\n  EXPOSE 3000\n  CMD [\"node\", \"server.js\"]\n","Npm","shell","",[31,174,175,194,203,222,237,248,260,267,275,282,296,308,317,328,337],{"__ignoreMap":172},[176,177,180,184,188,191],"span",{"class":178,"line":179},"line",1,[176,181,183],{"class":182},"sScJk","  FROM",[176,185,187],{"class":186},"sZZnC"," node:18-alpine",[176,189,190],{"class":186}," AS",[176,192,193],{"class":186}," build\n",[176,195,197,200],{"class":178,"line":196},2,[176,198,199],{"class":182},"  WORKDIR",[176,201,202],{"class":186}," \u002Fapp\n",[176,204,206,209,212,216,219],{"class":178,"line":205},3,[176,207,208],{"class":182},"  COPY",[176,210,211],{"class":186}," package",[176,213,215],{"class":214},"sj4cs","*",[176,217,218],{"class":186},".json",[176,220,221],{"class":186}," .\u002F\n",[176,223,225,228,231,234],{"class":178,"line":224},4,[176,226,227],{"class":182},"  RUN",[176,229,230],{"class":186}," npm",[176,232,233],{"class":186}," ci",[176,235,236],{"class":214}," --only=production\n",[176,238,240,242,245],{"class":178,"line":239},5,[176,241,208],{"class":182},[176,243,244],{"class":186}," .",[176,246,247],{"class":186}," .\n",[176,249,251,253,255,258],{"class":178,"line":250},6,[176,252,227],{"class":182},[176,254,230],{"class":186},[176,256,257],{"class":186}," run",[176,259,193],{"class":186},[176,261,263],{"class":178,"line":262},7,[176,264,266],{"emptyLinePlaceholder":265},true,"\n",[176,268,270,272],{"class":178,"line":269},8,[176,271,183],{"class":182},[176,273,274],{"class":186}," node:18-alpine\n",[176,276,278,280],{"class":178,"line":277},9,[176,279,199],{"class":182},[176,281,202],{"class":186},[176,283,285,287,290,293],{"class":178,"line":284},10,[176,286,208],{"class":182},[176,288,289],{"class":214}," --from=build",[176,291,292],{"class":186}," \u002Fapp\u002Fnode_modules",[176,294,295],{"class":186}," .\u002Fnode_modules\n",[176,297,299,301,303,306],{"class":178,"line":298},11,[176,300,208],{"class":182},[176,302,289],{"class":214},[176,304,305],{"class":186}," \u002Fapp",[176,307,247],{"class":186},[176,309,311,314],{"class":178,"line":310},12,[176,312,313],{"class":182},"  ENV",[176,315,316],{"class":186}," NODE_ENV=production\n",[176,318,320,322,325],{"class":178,"line":319},13,[176,321,313],{"class":182},[176,323,324],{"class":186}," PORT=",[176,326,327],{"class":214},"3000\n",[176,329,331,334],{"class":178,"line":330},14,[176,332,333],{"class":182},"  EXPOSE",[176,335,336],{"class":214}," 3000\n",[176,338,340,343,347,350,353],{"class":178,"line":339},15,[176,341,342],{"class":182},"  CMD",[176,344,346],{"class":345},"sVt8B"," [",[176,348,349],{"class":186},"\"node\"",[176,351,352],{"class":345},", ",[176,354,355],{"class":186},"\"server.js\"]\n",[166,357,360],{"className":168,"code":358,"filename":359,"language":171,"meta":172,"style":172},"  FROM node:18-alpine AS build\n  WORKDIR \u002Fapp\n  COPY package*.json .\u002F\n  RUN npm ci --only=production\n  COPY . .\n  RUN npm run build\n\n  FROM node:18-alpine\n  RUN npm install -g pm2\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Fapp\u002Fnode_modules .\u002Fnode_modules\n  COPY --from=build \u002Fapp .\n  ENV NODE_ENV=production\n  ENV PORT=3000\n  EXPOSE 3000\n  CMD [\"pm2-runtime\", \"start\", \"server.js\"]\n","Pm2",[31,361,362,372,378,390,400,408,418,422,428,443,449,459,469,475,483,489],{"__ignoreMap":172},[176,363,364,366,368,370],{"class":178,"line":179},[176,365,183],{"class":182},[176,367,187],{"class":186},[176,369,190],{"class":186},[176,371,193],{"class":186},[176,373,374,376],{"class":178,"line":196},[176,375,199],{"class":182},[176,377,202],{"class":186},[176,379,380,382,384,386,388],{"class":178,"line":205},[176,381,208],{"class":182},[176,383,211],{"class":186},[176,385,215],{"class":214},[176,387,218],{"class":186},[176,389,221],{"class":186},[176,391,392,394,396,398],{"class":178,"line":224},[176,393,227],{"class":182},[176,395,230],{"class":186},[176,397,233],{"class":186},[176,399,236],{"class":214},[176,401,402,404,406],{"class":178,"line":239},[176,403,208],{"class":182},[176,405,244],{"class":186},[176,407,247],{"class":186},[176,409,410,412,414,416],{"class":178,"line":250},[176,411,227],{"class":182},[176,413,230],{"class":186},[176,415,257],{"class":186},[176,417,193],{"class":186},[176,419,420],{"class":178,"line":262},[176,421,266],{"emptyLinePlaceholder":265},[176,423,424,426],{"class":178,"line":269},[176,425,183],{"class":182},[176,427,274],{"class":186},[176,429,430,432,434,437,440],{"class":178,"line":277},[176,431,227],{"class":182},[176,433,230],{"class":186},[176,435,436],{"class":186}," install",[176,438,439],{"class":214}," -g",[176,441,442],{"class":186}," pm2\n",[176,444,445,447],{"class":178,"line":284},[176,446,199],{"class":182},[176,448,202],{"class":186},[176,450,451,453,455,457],{"class":178,"line":298},[176,452,208],{"class":182},[176,454,289],{"class":214},[176,456,292],{"class":186},[176,458,295],{"class":186},[176,460,461,463,465,467],{"class":178,"line":310},[176,462,208],{"class":182},[176,464,289],{"class":214},[176,466,305],{"class":186},[176,468,247],{"class":186},[176,470,471,473],{"class":178,"line":319},[176,472,313],{"class":182},[176,474,316],{"class":186},[176,476,477,479,481],{"class":178,"line":330},[176,478,313],{"class":182},[176,480,324],{"class":186},[176,482,327],{"class":214},[176,484,485,487],{"class":178,"line":339},[176,486,333],{"class":182},[176,488,336],{"class":214},[176,490,492,494,496,499,501,504],{"class":178,"line":491},16,[176,493,342],{"class":182},[176,495,346],{"class":345},[176,497,498],{"class":186},"\"pm2-runtime\"",[176,500,352],{"class":345},[176,502,503],{"class":186},"\"start\",",[176,505,506],{"class":186}," \"server.js\"]\n",[16,508,509],{},[26,510,511],{},"2. Dockerfile NestJS",[166,513,517],{"className":514,"code":515,"language":516,"meta":172,"style":172},"language-bash shiki shiki-themes github-light github-dark","  FROM node:18-alpine AS build\n  WORKDIR \u002Fapp\n  COPY package*.json .\u002F\n  RUN npm ci\n  COPY . .\n  RUN npm run build\n\n  FROM node:18-alpine\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Fapp\u002Fnode_modules .\u002Fnode_modules\n  COPY --from=build \u002Fapp\u002Fdist .\u002Fdist\n  EXPOSE 3000\n  CMD [\"node\", \"dist\u002Fmain\".js\"]\n","bash",[31,518,519,529,535,547,556,564,574,578,584,590,600,612,618],{"__ignoreMap":172},[176,520,521,523,525,527],{"class":178,"line":179},[176,522,183],{"class":182},[176,524,187],{"class":186},[176,526,190],{"class":186},[176,528,193],{"class":186},[176,530,531,533],{"class":178,"line":196},[176,532,199],{"class":182},[176,534,202],{"class":186},[176,536,537,539,541,543,545],{"class":178,"line":205},[176,538,208],{"class":182},[176,540,211],{"class":186},[176,542,215],{"class":214},[176,544,218],{"class":186},[176,546,221],{"class":186},[176,548,549,551,553],{"class":178,"line":224},[176,550,227],{"class":182},[176,552,230],{"class":186},[176,554,555],{"class":186}," ci\n",[176,557,558,560,562],{"class":178,"line":239},[176,559,208],{"class":182},[176,561,244],{"class":186},[176,563,247],{"class":186},[176,565,566,568,570,572],{"class":178,"line":250},[176,567,227],{"class":182},[176,569,230],{"class":186},[176,571,257],{"class":186},[176,573,193],{"class":186},[176,575,576],{"class":178,"line":262},[176,577,266],{"emptyLinePlaceholder":265},[176,579,580,582],{"class":178,"line":269},[176,581,183],{"class":182},[176,583,274],{"class":186},[176,585,586,588],{"class":178,"line":277},[176,587,199],{"class":182},[176,589,202],{"class":186},[176,591,592,594,596,598],{"class":178,"line":284},[176,593,208],{"class":182},[176,595,289],{"class":214},[176,597,292],{"class":186},[176,599,295],{"class":186},[176,601,602,604,606,609],{"class":178,"line":298},[176,603,208],{"class":182},[176,605,289],{"class":214},[176,607,608],{"class":186}," \u002Fapp\u002Fdist",[176,610,611],{"class":186}," .\u002Fdist\n",[176,613,614,616],{"class":178,"line":310},[176,615,333],{"class":182},[176,617,336],{"class":214},[176,619,620,622,624,626,628],{"class":178,"line":319},[176,621,342],{"class":182},[176,623,346],{"class":345},[176,625,349],{"class":186},[176,627,352],{"class":345},[176,629,630],{"class":186},"\"dist\u002Fmain\".js\"]\n",[16,632,633],{},[26,634,635],{},"3. Dockerfile Express.js",[166,637,639],{"className":514,"code":638,"language":516,"meta":172,"style":172},"  FROM node:18-alpine AS build\n  WORKDIR \u002Fapp\n  COPY package*.json .\u002F\n  RUN npm ci\n  COPY . .\n\n  FROM node:18-alpine\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Fapp\u002Fnode_modules .\u002Fnode_modules\n  COPY --from=build \u002Fapp .\n  EXPOSE 3000\n  CMD [\"node\", \"index.js\"]\n",[31,640,641,651,657,669,677,685,689,695,701,711,721,727],{"__ignoreMap":172},[176,642,643,645,647,649],{"class":178,"line":179},[176,644,183],{"class":182},[176,646,187],{"class":186},[176,648,190],{"class":186},[176,650,193],{"class":186},[176,652,653,655],{"class":178,"line":196},[176,654,199],{"class":182},[176,656,202],{"class":186},[176,658,659,661,663,665,667],{"class":178,"line":205},[176,660,208],{"class":182},[176,662,211],{"class":186},[176,664,215],{"class":214},[176,666,218],{"class":186},[176,668,221],{"class":186},[176,670,671,673,675],{"class":178,"line":224},[176,672,227],{"class":182},[176,674,230],{"class":186},[176,676,555],{"class":186},[176,678,679,681,683],{"class":178,"line":239},[176,680,208],{"class":182},[176,682,244],{"class":186},[176,684,247],{"class":186},[176,686,687],{"class":178,"line":250},[176,688,266],{"emptyLinePlaceholder":265},[176,690,691,693],{"class":178,"line":262},[176,692,183],{"class":182},[176,694,274],{"class":186},[176,696,697,699],{"class":178,"line":269},[176,698,199],{"class":182},[176,700,202],{"class":186},[176,702,703,705,707,709],{"class":178,"line":277},[176,704,208],{"class":182},[176,706,289],{"class":214},[176,708,292],{"class":186},[176,710,295],{"class":186},[176,712,713,715,717,719],{"class":178,"line":284},[176,714,208],{"class":182},[176,716,289],{"class":214},[176,718,305],{"class":186},[176,720,247],{"class":186},[176,722,723,725],{"class":178,"line":298},[176,724,333],{"class":182},[176,726,336],{"class":214},[176,728,729,731,733,735,737],{"class":178,"line":310},[176,730,342],{"class":182},[176,732,346],{"class":345},[176,734,349],{"class":186},[176,736,352],{"class":345},[176,738,739],{"class":186},"\"index.js\"]\n",[16,741,742],{},[26,743,744],{},"4. Dockerfile React.js",[163,746,747,814],{},[166,748,753],{"className":749,"code":750,"filename":751,"language":752,"meta":172,"style":172},"language-dockerfile shiki shiki-themes github-light github-dark","  FROM node:18-alpine AS build\n  WORKDIR \u002Fapp\n  COPY package*.json .\u002F\n  RUN npm ci\n  COPY . .\n  RUN npm run build\n\n  FROM nginx:alpine\n  COPY --from=build \u002Fapp\u002Fbuild \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n  COPY nginx.conf \u002Fetc\u002Fnginx\u002Fnginx.conf\n  EXPOSE 3000\n  CMD [\"nginx\", \"-g\", \"daemon off;\"]\n","Dockerfile","dockerfile",[31,754,755,760,765,770,775,780,785,789,794,799,804,809],{"__ignoreMap":172},[176,756,757],{"class":178,"line":179},[176,758,759],{},"  FROM node:18-alpine AS build\n",[176,761,762],{"class":178,"line":196},[176,763,764],{},"  WORKDIR \u002Fapp\n",[176,766,767],{"class":178,"line":205},[176,768,769],{},"  COPY package*.json .\u002F\n",[176,771,772],{"class":178,"line":224},[176,773,774],{},"  RUN npm ci\n",[176,776,777],{"class":178,"line":239},[176,778,779],{},"  COPY . .\n",[176,781,782],{"class":178,"line":250},[176,783,784],{},"  RUN npm run build\n",[176,786,787],{"class":178,"line":262},[176,788,266],{"emptyLinePlaceholder":265},[176,790,791],{"class":178,"line":269},[176,792,793],{},"  FROM nginx:alpine\n",[176,795,796],{"class":178,"line":277},[176,797,798],{},"  COPY --from=build \u002Fapp\u002Fbuild \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n",[176,800,801],{"class":178,"line":284},[176,802,803],{},"  COPY nginx.conf \u002Fetc\u002Fnginx\u002Fnginx.conf\n",[176,805,806],{"class":178,"line":298},[176,807,808],{},"  EXPOSE 3000\n",[176,810,811],{"class":178,"line":310},[176,812,813],{},"  CMD [\"nginx\", \"-g\", \"daemon off;\"]\n",[166,815,820],{"className":816,"code":817,"filename":818,"language":819,"meta":172,"style":172},"language-nginx shiki shiki-themes github-light github-dark","  worker_processes auto;\n  error_log \u002Fvar\u002Flog\u002Fnginx\u002Ferror.log warn;\n  pid \u002Fvar\u002Frun\u002Fnginx.pid;\n\n  events {\n      worker_connections 1024;\n  }\n\n  http {\n      include \u002Fetc\u002Fnginx\u002Fmime.types;\n      default_type application\u002Foctet-stream;\n\n      log_format main '$remote_addr - $remote_user [$time_local] \"$request\" '\n                    '$status $body_bytes_sent \"$http_referer\" '\n                    '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n\n      access_log \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log main;\n\n      server_tokens off;\n\n      gzip on;\n      gzip_types text\u002Fplain text\u002Fcss application\u002Fjson application\u002Fjavascript text\u002Fxml application\u002Fxml application\u002Fxml+rss text\u002Fjavascript;\n\n      server {\n          listen 3000;  # Lắng nghe trên cổng 3000\n          server_name localhost;\n\n          root \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml;\n          index index.html;\n\n          location \u002F {\n              try_files $uri $uri\u002F \u002Findex.html;\n          }\n\n          location ~* \\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {\n              expires 1y;\n              add_header Cache-Control \"public, no-transform\";\n          }\n\n          error_page 404 \u002F404.html;\n          location = \u002F404.html {\n              internal;\n          }\n\n          error_page 500 502 503 504 \u002F50x.html;\n          location = \u002F50x.html {\n              internal;\n          }\n\n          location ~ \u002F\\.ht {\n              deny all;\n          }\n\n          add_header X-Frame-Options \"SAMEORIGIN\";\n          add_header X-Content-Type-Options \"nosniff\";\n          add_header X-XSS-Protection \"1; mode=block\";\n          add_header Referrer-Policy \"no-referrer-when-downgrade\";\n          add_header Content-Security-Policy \"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'self';\";\n      }\n  }\n","nginx\u002Fnginx.conf","nginx",[31,821,822,827,832,837,841,846,851,856,860,865,870,875,879,884,889,894,898,904,909,915,920,926,932,937,943,949,955,960,966,972,977,983,989,995,1000,1006,1012,1018,1023,1028,1034,1040,1046,1051,1056,1062,1068,1073,1078,1083,1089,1095,1100,1105,1111,1117,1123,1129,1135,1141],{"__ignoreMap":172},[176,823,824],{"class":178,"line":179},[176,825,826],{},"  worker_processes auto;\n",[176,828,829],{"class":178,"line":196},[176,830,831],{},"  error_log \u002Fvar\u002Flog\u002Fnginx\u002Ferror.log warn;\n",[176,833,834],{"class":178,"line":205},[176,835,836],{},"  pid \u002Fvar\u002Frun\u002Fnginx.pid;\n",[176,838,839],{"class":178,"line":224},[176,840,266],{"emptyLinePlaceholder":265},[176,842,843],{"class":178,"line":239},[176,844,845],{},"  events {\n",[176,847,848],{"class":178,"line":250},[176,849,850],{},"      worker_connections 1024;\n",[176,852,853],{"class":178,"line":262},[176,854,855],{},"  }\n",[176,857,858],{"class":178,"line":269},[176,859,266],{"emptyLinePlaceholder":265},[176,861,862],{"class":178,"line":277},[176,863,864],{},"  http {\n",[176,866,867],{"class":178,"line":284},[176,868,869],{},"      include \u002Fetc\u002Fnginx\u002Fmime.types;\n",[176,871,872],{"class":178,"line":298},[176,873,874],{},"      default_type application\u002Foctet-stream;\n",[176,876,877],{"class":178,"line":310},[176,878,266],{"emptyLinePlaceholder":265},[176,880,881],{"class":178,"line":319},[176,882,883],{},"      log_format main '$remote_addr - $remote_user [$time_local] \"$request\" '\n",[176,885,886],{"class":178,"line":330},[176,887,888],{},"                    '$status $body_bytes_sent \"$http_referer\" '\n",[176,890,891],{"class":178,"line":339},[176,892,893],{},"                    '\"$http_user_agent\" \"$http_x_forwarded_for\"';\n",[176,895,896],{"class":178,"line":491},[176,897,266],{"emptyLinePlaceholder":265},[176,899,901],{"class":178,"line":900},17,[176,902,903],{},"      access_log \u002Fvar\u002Flog\u002Fnginx\u002Faccess.log main;\n",[176,905,907],{"class":178,"line":906},18,[176,908,266],{"emptyLinePlaceholder":265},[176,910,912],{"class":178,"line":911},19,[176,913,914],{},"      server_tokens off;\n",[176,916,918],{"class":178,"line":917},20,[176,919,266],{"emptyLinePlaceholder":265},[176,921,923],{"class":178,"line":922},21,[176,924,925],{},"      gzip on;\n",[176,927,929],{"class":178,"line":928},22,[176,930,931],{},"      gzip_types text\u002Fplain text\u002Fcss application\u002Fjson application\u002Fjavascript text\u002Fxml application\u002Fxml application\u002Fxml+rss text\u002Fjavascript;\n",[176,933,935],{"class":178,"line":934},23,[176,936,266],{"emptyLinePlaceholder":265},[176,938,940],{"class":178,"line":939},24,[176,941,942],{},"      server {\n",[176,944,946],{"class":178,"line":945},25,[176,947,948],{},"          listen 3000;  # Lắng nghe trên cổng 3000\n",[176,950,952],{"class":178,"line":951},26,[176,953,954],{},"          server_name localhost;\n",[176,956,958],{"class":178,"line":957},27,[176,959,266],{"emptyLinePlaceholder":265},[176,961,963],{"class":178,"line":962},28,[176,964,965],{},"          root \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml;\n",[176,967,969],{"class":178,"line":968},29,[176,970,971],{},"          index index.html;\n",[176,973,975],{"class":178,"line":974},30,[176,976,266],{"emptyLinePlaceholder":265},[176,978,980],{"class":178,"line":979},31,[176,981,982],{},"          location \u002F {\n",[176,984,986],{"class":178,"line":985},32,[176,987,988],{},"              try_files $uri $uri\u002F \u002Findex.html;\n",[176,990,992],{"class":178,"line":991},33,[176,993,994],{},"          }\n",[176,996,998],{"class":178,"line":997},34,[176,999,266],{"emptyLinePlaceholder":265},[176,1001,1003],{"class":178,"line":1002},35,[176,1004,1005],{},"          location ~* \\.(js|css|png|jpg|jpeg|gif|ico|svg|woff|woff2|ttf|eot)$ {\n",[176,1007,1009],{"class":178,"line":1008},36,[176,1010,1011],{},"              expires 1y;\n",[176,1013,1015],{"class":178,"line":1014},37,[176,1016,1017],{},"              add_header Cache-Control \"public, no-transform\";\n",[176,1019,1021],{"class":178,"line":1020},38,[176,1022,994],{},[176,1024,1026],{"class":178,"line":1025},39,[176,1027,266],{"emptyLinePlaceholder":265},[176,1029,1031],{"class":178,"line":1030},40,[176,1032,1033],{},"          error_page 404 \u002F404.html;\n",[176,1035,1037],{"class":178,"line":1036},41,[176,1038,1039],{},"          location = \u002F404.html {\n",[176,1041,1043],{"class":178,"line":1042},42,[176,1044,1045],{},"              internal;\n",[176,1047,1049],{"class":178,"line":1048},43,[176,1050,994],{},[176,1052,1054],{"class":178,"line":1053},44,[176,1055,266],{"emptyLinePlaceholder":265},[176,1057,1059],{"class":178,"line":1058},45,[176,1060,1061],{},"          error_page 500 502 503 504 \u002F50x.html;\n",[176,1063,1065],{"class":178,"line":1064},46,[176,1066,1067],{},"          location = \u002F50x.html {\n",[176,1069,1071],{"class":178,"line":1070},47,[176,1072,1045],{},[176,1074,1076],{"class":178,"line":1075},48,[176,1077,994],{},[176,1079,1081],{"class":178,"line":1080},49,[176,1082,266],{"emptyLinePlaceholder":265},[176,1084,1086],{"class":178,"line":1085},50,[176,1087,1088],{},"          location ~ \u002F\\.ht {\n",[176,1090,1092],{"class":178,"line":1091},51,[176,1093,1094],{},"              deny all;\n",[176,1096,1098],{"class":178,"line":1097},52,[176,1099,994],{},[176,1101,1103],{"class":178,"line":1102},53,[176,1104,266],{"emptyLinePlaceholder":265},[176,1106,1108],{"class":178,"line":1107},54,[176,1109,1110],{},"          add_header X-Frame-Options \"SAMEORIGIN\";\n",[176,1112,1114],{"class":178,"line":1113},55,[176,1115,1116],{},"          add_header X-Content-Type-Options \"nosniff\";\n",[176,1118,1120],{"class":178,"line":1119},56,[176,1121,1122],{},"          add_header X-XSS-Protection \"1; mode=block\";\n",[176,1124,1126],{"class":178,"line":1125},57,[176,1127,1128],{},"          add_header Referrer-Policy \"no-referrer-when-downgrade\";\n",[176,1130,1132],{"class":178,"line":1131},58,[176,1133,1134],{},"          add_header Content-Security-Policy \"default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self'; frame-ancestors 'self';\";\n",[176,1136,1138],{"class":178,"line":1137},59,[176,1139,1140],{},"      }\n",[176,1142,1144],{"class":178,"line":1143},60,[176,1145,855],{},[16,1147,1148],{},[26,1149,1150],{},"5. Vite and Nginx",[163,1152,1153,1218],{},[166,1154,1156],{"className":749,"code":1155,"filename":751,"language":752,"meta":172,"style":172},"  FROM node:21-alpine3.18 as build\n  WORKDIR \u002Fapp\n  COPY package.json .\u002F\n  COPY package-lock.json .\u002F\n  RUN npm install\n  COPY . .\n  RUN npm run build\n\n  FROM nginx:1.25-alpine\n  COPY --from=build \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n  COPY nginx.conf \u002Fetc\u002Fnginx\u002Fconf.d\u002Fdefault.conf\n  EXPOSE 80\n  CMD [\"nginx\", \"-g\", \"daemon off;\"]\n",[31,1157,1158,1163,1167,1172,1177,1182,1186,1190,1194,1199,1204,1209,1214],{"__ignoreMap":172},[176,1159,1160],{"class":178,"line":179},[176,1161,1162],{},"  FROM node:21-alpine3.18 as build\n",[176,1164,1165],{"class":178,"line":196},[176,1166,764],{},[176,1168,1169],{"class":178,"line":205},[176,1170,1171],{},"  COPY package.json .\u002F\n",[176,1173,1174],{"class":178,"line":224},[176,1175,1176],{},"  COPY package-lock.json .\u002F\n",[176,1178,1179],{"class":178,"line":239},[176,1180,1181],{},"  RUN npm install\n",[176,1183,1184],{"class":178,"line":250},[176,1185,779],{},[176,1187,1188],{"class":178,"line":262},[176,1189,784],{},[176,1191,1192],{"class":178,"line":269},[176,1193,266],{"emptyLinePlaceholder":265},[176,1195,1196],{"class":178,"line":277},[176,1197,1198],{},"  FROM nginx:1.25-alpine\n",[176,1200,1201],{"class":178,"line":284},[176,1202,1203],{},"  COPY --from=build \u002Fapp\u002Fdist \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml\n",[176,1205,1206],{"class":178,"line":298},[176,1207,1208],{},"  COPY nginx.conf \u002Fetc\u002Fnginx\u002Fconf.d\u002Fdefault.conf\n",[176,1210,1211],{"class":178,"line":310},[176,1212,1213],{},"  EXPOSE 80\n",[176,1215,1216],{"class":178,"line":319},[176,1217,813],{},[166,1219,1222],{"className":816,"code":1220,"filename":1221,"language":819,"meta":172,"style":172},"  server {\n    listen 80;\n    server_name localhost;\n    location \u002F {\n      root \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml;\n      index index.html;\n      try_files $uri \u002Findex.html;\n    }\n  }\n","nginx.conf",[31,1223,1224,1229,1234,1239,1244,1249,1254,1259,1264],{"__ignoreMap":172},[176,1225,1226],{"class":178,"line":179},[176,1227,1228],{},"  server {\n",[176,1230,1231],{"class":178,"line":196},[176,1232,1233],{},"    listen 80;\n",[176,1235,1236],{"class":178,"line":205},[176,1237,1238],{},"    server_name localhost;\n",[176,1240,1241],{"class":178,"line":224},[176,1242,1243],{},"    location \u002F {\n",[176,1245,1246],{"class":178,"line":239},[176,1247,1248],{},"      root \u002Fusr\u002Fshare\u002Fnginx\u002Fhtml;\n",[176,1250,1251],{"class":178,"line":250},[176,1252,1253],{},"      index index.html;\n",[176,1255,1256],{"class":178,"line":262},[176,1257,1258],{},"      try_files $uri \u002Findex.html;\n",[176,1260,1261],{"class":178,"line":269},[176,1262,1263],{},"    }\n",[176,1265,1266],{"class":178,"line":277},[176,1267,855],{},[16,1269,1270],{},[26,1271,1272],{},"6. Dockerfile Go",[166,1274,1276],{"className":514,"code":1275,"language":516,"meta":172,"style":172},"  FROM golang:1.20-alpine AS build\n  WORKDIR \u002Fapp\n  COPY go.mod go.sum .\u002F\n  RUN go mod download\n  COPY . .\n  RUN CGO_ENABLED=0 GOOS=linux go build -o \u002Fapp\u002Fmyapp\n\n  FROM alpine:latest\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Fapp\u002Fmyapp \u002Fapp\u002Fmyapp\n  EXPOSE 8080\n  CMD [\"\u002Fapp\u002Fmyapp\"]\n",[31,1277,1278,1289,1295,1307,1320,1328,1352,1356,1363,1369,1380,1387],{"__ignoreMap":172},[176,1279,1280,1282,1285,1287],{"class":178,"line":179},[176,1281,183],{"class":182},[176,1283,1284],{"class":186}," golang:1.20-alpine",[176,1286,190],{"class":186},[176,1288,193],{"class":186},[176,1290,1291,1293],{"class":178,"line":196},[176,1292,199],{"class":182},[176,1294,202],{"class":186},[176,1296,1297,1299,1302,1305],{"class":178,"line":205},[176,1298,208],{"class":182},[176,1300,1301],{"class":186}," go.mod",[176,1303,1304],{"class":186}," go.sum",[176,1306,221],{"class":186},[176,1308,1309,1311,1314,1317],{"class":178,"line":224},[176,1310,227],{"class":182},[176,1312,1313],{"class":186}," go",[176,1315,1316],{"class":186}," mod",[176,1318,1319],{"class":186}," download\n",[176,1321,1322,1324,1326],{"class":178,"line":239},[176,1323,208],{"class":182},[176,1325,244],{"class":186},[176,1327,247],{"class":186},[176,1329,1330,1332,1335,1338,1341,1343,1346,1349],{"class":178,"line":250},[176,1331,227],{"class":182},[176,1333,1334],{"class":186}," CGO_ENABLED=",[176,1336,1337],{"class":214},"0",[176,1339,1340],{"class":186}," GOOS=linux",[176,1342,1313],{"class":186},[176,1344,1345],{"class":186}," build",[176,1347,1348],{"class":214}," -o",[176,1350,1351],{"class":186}," \u002Fapp\u002Fmyapp\n",[176,1353,1354],{"class":178,"line":262},[176,1355,266],{"emptyLinePlaceholder":265},[176,1357,1358,1360],{"class":178,"line":269},[176,1359,183],{"class":182},[176,1361,1362],{"class":186}," alpine:latest\n",[176,1364,1365,1367],{"class":178,"line":277},[176,1366,199],{"class":182},[176,1368,202],{"class":186},[176,1370,1371,1373,1375,1378],{"class":178,"line":284},[176,1372,208],{"class":182},[176,1374,289],{"class":214},[176,1376,1377],{"class":186}," \u002Fapp\u002Fmyapp",[176,1379,1351],{"class":186},[176,1381,1382,1384],{"class":178,"line":298},[176,1383,333],{"class":182},[176,1385,1386],{"class":214}," 8080\n",[176,1388,1389,1391,1393,1396],{"class":178,"line":310},[176,1390,342],{"class":182},[176,1392,346],{"class":345},[176,1394,1395],{"class":186},"\"\u002Fapp\u002Fmyapp\"",[176,1397,1398],{"class":345},"]\n",[16,1400,1401],{},[26,1402,1403],{},"7. Dockerfile Python",[163,1405,1406,1475],{},[166,1407,1412],{"className":1408,"code":1409,"filename":1410,"language":1411,"meta":172,"style":172},"language-py shiki shiki-themes github-light github-dark","  FROM python:3.9-slim AS build\n  WORKDIR \u002Fapp\n  COPY requirements.txt .\n  RUN pip install --user --no-cache-dir -r requirements.txt\n  COPY . .\n\n  FROM python:3.9-slim\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Froot\u002F.local \u002Froot\u002F.local\n  COPY --from=build \u002Fapp .\n  ENV PATH=\u002Froot\u002F.local\u002Fbin:$PATH\n  EXPOSE 5000\n  CMD [\"flask\", \"run\", \"--host=0.0.0.0\"]\n","Flask","py",[31,1413,1414,1419,1423,1428,1433,1437,1441,1446,1450,1455,1460,1465,1470],{"__ignoreMap":172},[176,1415,1416],{"class":178,"line":179},[176,1417,1418],{},"  FROM python:3.9-slim AS build\n",[176,1420,1421],{"class":178,"line":196},[176,1422,764],{},[176,1424,1425],{"class":178,"line":205},[176,1426,1427],{},"  COPY requirements.txt .\n",[176,1429,1430],{"class":178,"line":224},[176,1431,1432],{},"  RUN pip install --user --no-cache-dir -r requirements.txt\n",[176,1434,1435],{"class":178,"line":239},[176,1436,779],{},[176,1438,1439],{"class":178,"line":250},[176,1440,266],{"emptyLinePlaceholder":265},[176,1442,1443],{"class":178,"line":262},[176,1444,1445],{},"  FROM python:3.9-slim\n",[176,1447,1448],{"class":178,"line":269},[176,1449,764],{},[176,1451,1452],{"class":178,"line":277},[176,1453,1454],{},"  COPY --from=build \u002Froot\u002F.local \u002Froot\u002F.local\n",[176,1456,1457],{"class":178,"line":284},[176,1458,1459],{},"  COPY --from=build \u002Fapp .\n",[176,1461,1462],{"class":178,"line":298},[176,1463,1464],{},"  ENV PATH=\u002Froot\u002F.local\u002Fbin:$PATH\n",[176,1466,1467],{"class":178,"line":310},[176,1468,1469],{},"  EXPOSE 5000\n",[176,1471,1472],{"class":178,"line":319},[176,1473,1474],{},"  CMD [\"flask\", \"run\", \"--host=0.0.0.0\"]\n",[166,1476,1481],{"className":1477,"code":1478,"filename":1479,"language":1480,"meta":172,"style":172},"language-django shiki shiki-themes github-light github-dark","  FROM python:3.9-slim AS build\n  WORKDIR \u002Fapp\n  COPY requirements.txt .\n  RUN pip install --user --no-cache-dir -r requirements.txt\n  COPY . .\n\n  FROM python:3.9-slim\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Froot\u002F.local \u002Froot\u002F.local\n  COPY --from=build \u002Fapp .\n  ENV PATH=\u002Froot\u002F.local\u002Fbin:$PATH\n  EXPOSE 8000\n  CMD [\"python\", \"manage.py\", \"runserver\", \"0.0.0.0:8000\"]\n","Django","django",[31,1482,1483,1487,1491,1495,1499,1503,1507,1511,1515,1519,1523,1527,1532],{"__ignoreMap":172},[176,1484,1485],{"class":178,"line":179},[176,1486,1418],{},[176,1488,1489],{"class":178,"line":196},[176,1490,764],{},[176,1492,1493],{"class":178,"line":205},[176,1494,1427],{},[176,1496,1497],{"class":178,"line":224},[176,1498,1432],{},[176,1500,1501],{"class":178,"line":239},[176,1502,779],{},[176,1504,1505],{"class":178,"line":250},[176,1506,266],{"emptyLinePlaceholder":265},[176,1508,1509],{"class":178,"line":262},[176,1510,1445],{},[176,1512,1513],{"class":178,"line":269},[176,1514,764],{},[176,1516,1517],{"class":178,"line":277},[176,1518,1454],{},[176,1520,1521],{"class":178,"line":284},[176,1522,1459],{},[176,1524,1525],{"class":178,"line":298},[176,1526,1464],{},[176,1528,1529],{"class":178,"line":310},[176,1530,1531],{},"  EXPOSE 8000\n",[176,1533,1534],{"class":178,"line":319},[176,1535,1536],{},"  CMD [\"python\", \"manage.py\", \"runserver\", \"0.0.0.0:8000\"]\n",[16,1538,1539],{},[26,1540,1541],{},"8. Dockerfile NetCore",[166,1543,1545],{"className":514,"code":1544,"language":516,"meta":172,"style":172},"  FROM mcr.microsoft.com\u002Fdotnet\u002Fsdk:7.0 AS build\n  WORKDIR \u002Fsrc\n  COPY *.csproj .\n  RUN dotnet restore\n  COPY . .\n  RUN dotnet publish -c Release -o \u002Fapp\u002Fpublish \u002Fp:UseAppHost=false\n\n  FROM mcr.microsoft.com\u002Fdotnet\u002Faspnet:7.0 AS runtime\n  WORKDIR \u002Fapp\n  COPY --from=build \u002Fapp\u002Fpublish .\n  ENV ASPNETCORE_URLS=http:\u002F\u002F+:80\n  ENV DOTNET_RUNNING_IN_CONTAINER=true\n  ENV DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1\n\n  RUN find \u002Fapp -name \"*.pdb\" -delete && \\\n      find \u002Fapp -name \"*.xml\" -delete\n  EXPOSE 80\n  ENTRYPOINT [\"dotnet\", \"YourApp.dll\"]\n",[31,1546,1547,1558,1565,1577,1587,1595,1621,1625,1637,1643,1653,1660,1670,1680,1684,1708,1723,1730],{"__ignoreMap":172},[176,1548,1549,1551,1554,1556],{"class":178,"line":179},[176,1550,183],{"class":182},[176,1552,1553],{"class":186}," mcr.microsoft.com\u002Fdotnet\u002Fsdk:7.0",[176,1555,190],{"class":186},[176,1557,193],{"class":186},[176,1559,1560,1562],{"class":178,"line":196},[176,1561,199],{"class":182},[176,1563,1564],{"class":186}," \u002Fsrc\n",[176,1566,1567,1569,1572,1575],{"class":178,"line":205},[176,1568,208],{"class":182},[176,1570,1571],{"class":214}," *",[176,1573,1574],{"class":186},".csproj",[176,1576,247],{"class":186},[176,1578,1579,1581,1584],{"class":178,"line":224},[176,1580,227],{"class":182},[176,1582,1583],{"class":186}," dotnet",[176,1585,1586],{"class":186}," restore\n",[176,1588,1589,1591,1593],{"class":178,"line":239},[176,1590,208],{"class":182},[176,1592,244],{"class":186},[176,1594,247],{"class":186},[176,1596,1597,1599,1601,1604,1607,1610,1612,1615,1618],{"class":178,"line":250},[176,1598,227],{"class":182},[176,1600,1583],{"class":186},[176,1602,1603],{"class":186}," publish",[176,1605,1606],{"class":214}," -c",[176,1608,1609],{"class":186}," Release",[176,1611,1348],{"class":214},[176,1613,1614],{"class":186}," \u002Fapp\u002Fpublish",[176,1616,1617],{"class":186}," \u002Fp:UseAppHost=",[176,1619,1620],{"class":214},"false\n",[176,1622,1623],{"class":178,"line":262},[176,1624,266],{"emptyLinePlaceholder":265},[176,1626,1627,1629,1632,1634],{"class":178,"line":269},[176,1628,183],{"class":182},[176,1630,1631],{"class":186}," mcr.microsoft.com\u002Fdotnet\u002Faspnet:7.0",[176,1633,190],{"class":186},[176,1635,1636],{"class":186}," runtime\n",[176,1638,1639,1641],{"class":178,"line":277},[176,1640,199],{"class":182},[176,1642,202],{"class":186},[176,1644,1645,1647,1649,1651],{"class":178,"line":284},[176,1646,208],{"class":182},[176,1648,289],{"class":214},[176,1650,1614],{"class":186},[176,1652,247],{"class":186},[176,1654,1655,1657],{"class":178,"line":298},[176,1656,313],{"class":182},[176,1658,1659],{"class":186}," ASPNETCORE_URLS=http:\u002F\u002F+:80\n",[176,1661,1662,1664,1667],{"class":178,"line":310},[176,1663,313],{"class":182},[176,1665,1666],{"class":186}," DOTNET_RUNNING_IN_CONTAINER=",[176,1668,1669],{"class":214},"true\n",[176,1671,1672,1674,1677],{"class":178,"line":319},[176,1673,313],{"class":182},[176,1675,1676],{"class":186}," DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=",[176,1678,1679],{"class":214},"1\n",[176,1681,1682],{"class":178,"line":330},[176,1683,266],{"emptyLinePlaceholder":265},[176,1685,1686,1688,1691,1693,1696,1699,1702,1705],{"class":178,"line":339},[176,1687,227],{"class":182},[176,1689,1690],{"class":186}," find",[176,1692,305],{"class":186},[176,1694,1695],{"class":214}," -name",[176,1697,1698],{"class":186}," \"*.pdb\"",[176,1700,1701],{"class":214}," -delete",[176,1703,1704],{"class":345}," && ",[176,1706,1707],{"class":214},"\\\n",[176,1709,1710,1713,1715,1717,1720],{"class":178,"line":491},[176,1711,1712],{"class":182},"      find",[176,1714,305],{"class":186},[176,1716,1695],{"class":214},[176,1718,1719],{"class":186}," \"*.xml\"",[176,1721,1722],{"class":214}," -delete\n",[176,1724,1725,1727],{"class":178,"line":900},[176,1726,333],{"class":182},[176,1728,1729],{"class":214}," 80\n",[176,1731,1732,1735,1737,1740,1742],{"class":178,"line":906},[176,1733,1734],{"class":182},"  ENTRYPOINT",[176,1736,346],{"class":345},[176,1738,1739],{"class":186},"\"dotnet\"",[176,1741,352],{"class":345},[176,1743,1744],{"class":186},"\"YourApp.dll\"]\n",[1746,1747,1748],"style",{},"html pre.shiki code .sScJk, html code.shiki .sScJk{--shiki-default:#6F42C1;--shiki-dark:#B392F0}html pre.shiki code .sZZnC, html code.shiki .sZZnC{--shiki-default:#032F62;--shiki-dark:#9ECBFF}html pre.shiki code .sj4cs, html code.shiki .sj4cs{--shiki-default:#005CC5;--shiki-dark:#79B8FF}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":172,"searchDepth":196,"depth":196,"links":1750},[1751,1752],{"id":13,"depth":196,"text":14},{"id":155,"depth":196,"text":156},"docker","Collection of Dockerfile templates for different tech stacks.","md",{"src":1757,"alt":1758},"https:\u002F\u002Fraw.githubusercontent.com\u002Ffullstack-core\u002Fblog\u002Frefs\u002Fheads\u002Fmain\u002Fblog\u002Fcover\u002Fdockerfile-templates.webp","Docker templates",{},"\u002Fposts\u002Fdocker\u002Fdockerfile-templates","2025-04-08",{"title":5,"description":1754},{"loc":1760,"lastmod":1761},"posts\u002Fdocker\u002Fdockerfile-templates",[1753,1766],"devops",false,"Y7iB4ApjxS_PtoaLwua4ij7GdEWcCOu411XDJCCGzC0",[1770,1886,1894,2033],{"title":1771,"icon":1772,"path":1773,"stem":1774,"children":1775,"page":1767},"Cheatsheets","fluent-color:paw-16","\u002Fcheatsheets","cheatsheets",[1776,1781,1786,1791,1796,1801,1806,1811,1816,1821,1826,1831,1836,1841,1846,1851,1856,1861,1866,1871,1876,1881],{"title":1777,"path":1778,"stem":1779,"icon":1780},"Bash","\u002Fcheatsheets\u002Fbash","cheatsheets\u002Fbash","material-icon-theme:powershell",{"title":1782,"path":1783,"stem":1784,"icon":1785},"CSS","\u002Fcheatsheets\u002Fcss","cheatsheets\u002Fcss","vscode-icons:file-type-css2",{"title":1787,"path":1788,"stem":1789,"icon":1790},"Docker","\u002Fcheatsheets\u002Fdocker","cheatsheets\u002Fdocker","vscode-icons:file-type-docker2",{"title":1792,"path":1793,"stem":1794,"icon":1795},"Git","\u002Fcheatsheets\u002Fgit","cheatsheets\u002Fgit","devicon:git",{"title":1797,"path":1798,"stem":1799,"icon":1800},"Golang","\u002Fcheatsheets\u002Fgo","cheatsheets\u002Fgo","material-icon-theme:go",{"title":1802,"path":1803,"stem":1804,"icon":1805},"HTML","\u002Fcheatsheets\u002Fhtml","cheatsheets\u002Fhtml","material-icon-theme:html",{"title":1807,"path":1808,"stem":1809,"icon":1810},"JavaScript","\u002Fcheatsheets\u002Fjavascript","cheatsheets\u002Fjavascript","material-icon-theme:javascript",{"title":1812,"path":1813,"stem":1814,"icon":1815},"Latex","\u002Fcheatsheets\u002Flatex","cheatsheets\u002Flatex","material-icon-theme:latexmk",{"title":1817,"path":1818,"stem":1819,"icon":1820},"Linux","\u002Fcheatsheets\u002Flinux","cheatsheets\u002Flinux","devicon:linux",{"title":1822,"path":1823,"stem":1824,"icon":1825},"Markdown","\u002Fcheatsheets\u002Fmarkdown","cheatsheets\u002Fmarkdown","material-icon-theme:markdown",{"title":1827,"path":1828,"stem":1829,"icon":1830},"Mongo","\u002Fcheatsheets\u002Fmongo","cheatsheets\u002Fmongo","devicon:mongodb",{"title":1832,"path":1833,"stem":1834,"icon":1835},"Nest","\u002Fcheatsheets\u002Fnest","cheatsheets\u002Fnest","material-icon-theme:nest",{"title":1837,"path":1838,"stem":1839,"icon":1840},"Next","\u002Fcheatsheets\u002Fnext","cheatsheets\u002Fnext","logos:nextjs-icon",{"title":1842,"path":1843,"stem":1844,"icon":1845},"Node","\u002Fcheatsheets\u002Fnode","cheatsheets\u002Fnode","material-icon-theme:nodejs",{"title":1847,"path":1848,"stem":1849,"icon":1850},"Nuxt","\u002Fcheatsheets\u002Fnuxt","cheatsheets\u002Fnuxt","material-icon-theme:nuxt",{"title":1852,"path":1853,"stem":1854,"icon":1855},"React","\u002Fcheatsheets\u002Freact","cheatsheets\u002Freact","material-icon-theme:react",{"title":1857,"path":1858,"stem":1859,"icon":1860},"Redis","\u002Fcheatsheets\u002Fredis","cheatsheets\u002Fredis","vscode-icons:folder-type-redis-opened",{"title":1862,"path":1863,"stem":1864,"icon":1865},"SQL","\u002Fcheatsheets\u002Fsql","cheatsheets\u002Fsql","material-icon-theme:database",{"title":1867,"path":1868,"stem":1869,"icon":1870},"Typescript","\u002Fcheatsheets\u002Ftypescript","cheatsheets\u002Ftypescript","material-icon-theme:typescript",{"title":1872,"path":1873,"stem":1874,"icon":1875},"Vercel","\u002Fcheatsheets\u002Fvercel","cheatsheets\u002Fvercel","vscode-icons:file-type-light-vercel",{"title":1877,"path":1878,"stem":1879,"icon":1880},"Vue","\u002Fcheatsheets\u002Fvue","cheatsheets\u002Fvue","material-icon-theme:vue",{"title":1882,"path":1883,"stem":1884,"icon":1885},"Windows","\u002Fcheatsheets\u002Fwindow","cheatsheets\u002Fwindow","material-icon-theme:folder-windows",{"title":1887,"icon":1772,"path":1888,"stem":1889,"children":1890,"page":1767},"Interviews","\u002Finterviews","interviews",[1891],{"title":1802,"path":1892,"stem":1893,"icon":1805},"\u002Finterviews\u002Fhtml","interviews\u002Fhtml",{"title":1895,"icon":1896,"path":1897,"stem":1898,"children":1899,"page":1767},"Posts","fluent-color:data-bar-vertical-ascending-24","\u002Fposts","posts",[1900,1909,1922,1948,1956,1969,1978,1987,1997,2023],{"title":1901,"icon":1865,"redirect":1902,"path":1903,"stem":1904,"children":1905,"page":1767},"Database","\u002Fposts\u002Fdatabase\u002Freplication-strategy","\u002Fposts\u002Fdatabase","posts\u002Fdatabase",[1906],{"title":1907,"path":1902,"stem":1908,"icon":6},"Database Replication strategy in large systems","posts\u002Fdatabase\u002Freplication-strategy",{"title":1787,"icon":1790,"redirect":1910,"path":1911,"stem":1912,"children":1913,"page":1767},"\u002Fposts\u002Fdocker\u002Fdocker-commands","\u002Fposts\u002Fdocker","posts\u002Fdocker",[1914,1917,1918],{"title":1915,"path":1910,"stem":1916,"icon":6},"Docker commands essentials","posts\u002Fdocker\u002Fdocker-commands",{"title":5,"path":1760,"stem":1764,"icon":6},{"title":1919,"path":1920,"stem":1921,"icon":6},"Setup Docker environment on Windows","\u002Fposts\u002Fdocker\u002Fsetup-docker-on-window","posts\u002Fdocker\u002Fsetup-docker-on-window",{"title":1923,"icon":1924,"redirect":1925,"path":1926,"stem":1927,"children":1928,"page":1767},"Git & GitHub","material-icon-theme:git","\u002Fposts\u002Fgit\u002Fbrightly-decorate-graph","\u002Fposts\u002Fgit","posts\u002Fgit",[1929,1932,1936,1940,1944],{"title":1930,"path":1925,"stem":1931,"icon":6},"Brightly decorate your GitHub Graph","posts\u002Fgit\u002Fbrightly-decorate-graph",{"title":1933,"path":1934,"stem":1935,"icon":6},"Download a specific folder on GitHub repository","\u002Fposts\u002Fgit\u002Fdownload-specific-folder","posts\u002Fgit\u002Fdownload-specific-folder",{"title":1937,"path":1938,"stem":1939,"icon":6},"Syncing Git Tags across to other repositories","\u002Fposts\u002Fgit\u002Fsyncing-tags-across-repositories","posts\u002Fgit\u002Fsyncing-tags-across-repositories",{"title":1941,"path":1942,"stem":1943,"icon":6},"Unlocking GitHub Achievement badges","\u002Fposts\u002Fgit\u002Funlocking-achievement-badges","posts\u002Fgit\u002Funlocking-achievement-badges",{"title":1945,"path":1946,"stem":1947,"icon":6},"Essential Git commands every developer should master","\u002Fposts\u002Fgit\u002Fuseful-commands-like-pro","posts\u002Fgit\u002Fuseful-commands-like-pro",{"title":1797,"icon":1800,"redirect":1949,"path":1950,"stem":1951,"children":1952,"page":1767},"\u002Fposts\u002Fgolang\u002Foptimizing-performance-with-pgo","\u002Fposts\u002Fgolang","posts\u002Fgolang",[1953],{"title":1954,"path":1949,"stem":1955,"icon":6},"Optimizing Performance in Go Applications with PGO","posts\u002Fgolang\u002Foptimizing-performance-with-pgo",{"title":1807,"icon":1957,"redirect":1958,"path":1959,"stem":1960,"children":1961,"page":1767},"vscode-icons:file-type-js","\u002Fposts\u002Fjavascript\u002F9-lines-of-tips","\u002Fposts\u002Fjavascript","posts\u002Fjavascript",[1962,1965],{"title":1963,"path":1958,"stem":1964,"icon":6},"9 lines of JavaScript replace 50 lines of code","posts\u002Fjavascript\u002F9-lines-of-tips",{"title":1966,"path":1967,"stem":1968,"icon":6},"Javascript Promises - Specific functions and use cases","\u002Fposts\u002Fjavascript\u002Fpromises-cheatsheet","posts\u002Fjavascript\u002Fpromises-cheatsheet",{"title":1842,"icon":1970,"redirect":1971,"path":1972,"stem":1973,"children":1974,"page":1767},"material-icon-theme:nodejs-alt","\u002Fposts\u002Fnodejs\u002Fevent-loop","\u002Fposts\u002Fnodejs","posts\u002Fnodejs",[1975],{"title":1976,"path":1971,"stem":1977,"icon":6},"Secret about Event Loop flow in Nodejs","posts\u002Fnodejs\u002Fevent-loop",{"title":1847,"icon":1979,"redirect":1980,"path":1981,"stem":1982,"children":1983,"page":1767},"vscode-icons:file-type-nuxt","\u002Fposts\u002Fnuxt\u002Fenable-pwa-in-nuxt","\u002Fposts\u002Fnuxt","posts\u002Fnuxt",[1984],{"title":1985,"path":1980,"stem":1986,"icon":6},"Enable PWA and Service Worker in Nuxt","posts\u002Fnuxt\u002Fenable-pwa-in-nuxt",{"title":1988,"icon":1989,"redirect":1990,"path":1991,"stem":1992,"children":1993,"page":1767},"Performance","emojione:rocket","\u002Fposts\u002Fperformance\u002Fbackground-image-injection-problem","\u002Fposts\u002Fperformance","posts\u002Fperformance",[1994],{"title":1995,"path":1990,"stem":1996,"icon":6},"Background-Image injection problem in UX","posts\u002Fperformance\u002Fbackground-image-injection-problem",{"title":1998,"icon":1999,"redirect":2000,"path":2001,"stem":2002,"children":2003,"page":1767},"Tutorial","fluent-color:book-open-lightbulb-24","\u002Fposts\u002Ftutorial\u002Fclassification-and-functionality-of-the-servers","\u002Fposts\u002Ftutorial","posts\u002Ftutorial",[2004,2007,2011,2015,2019],{"title":2005,"path":2000,"stem":2006,"icon":6},"Classification and functionality of the servers","posts\u002Ftutorial\u002Fclassification-and-functionality-of-the-servers",{"title":2008,"path":2009,"stem":2010,"icon":6},"What is the difference between localhost and 127.0.0.1?","\u002Fposts\u002Ftutorial\u002Fdifferent-between-localhost-and-127-0-0-1","posts\u002Ftutorial\u002Fdifferent-between-localhost-and-127-0-0-1",{"title":2012,"path":2013,"stem":2014,"icon":6},"8 essential network protocols every programmer should know","\u002Fposts\u002Ftutorial\u002Fessential-network-protocols","posts\u002Ftutorial\u002Fessential-network-protocols",{"title":2016,"path":2017,"stem":2018,"icon":6},"Pre rels in header link tag - SEO technique enhancement","\u002Fposts\u002Ftutorial\u002Fpre-rels-in-header-link-tag","posts\u002Ftutorial\u002Fpre-rels-in-header-link-tag",{"title":2020,"path":2021,"stem":2022,"icon":6},"Better code with SOLID principles","\u002Fposts\u002Ftutorial\u002Fwhat-is-solid","posts\u002Ftutorial\u002Fwhat-is-solid",{"title":2024,"icon":2025,"redirect":2026,"path":2027,"stem":2028,"children":2029,"page":1767},"UI\u002FUX","devicon:figma","\u002Fposts\u002Fuiux\u002Fcommon-button-mistake","\u002Fposts\u002Fuiux","posts\u002Fuiux",[2030],{"title":2031,"path":2026,"stem":2032,"icon":6},"Common Button Mistake in UI\u002FUX","posts\u002Fuiux\u002Fcommon-button-mistake",{"title":156,"icon":2034,"path":2035,"stem":155,"children":2036,"page":1767},"fluent-color:data-pie-24","\u002Ftemplates",[2037,2040,2043,2046,2049],{"title":1797,"path":2038,"stem":2039,"icon":1800},"\u002Ftemplates\u002Fgo","templates\u002Fgo",{"title":1837,"path":2041,"stem":2042,"icon":1840},"\u002Ftemplates\u002Fnext","templates\u002Fnext",{"title":1847,"path":2044,"stem":2045,"icon":1850},"\u002Ftemplates\u002Fnuxt","templates\u002Fnuxt",{"title":1852,"path":2047,"stem":2048,"icon":1855},"\u002Ftemplates\u002Freact","templates\u002Freact",{"title":1877,"path":2050,"stem":2051,"icon":1880},"\u002Ftemplates\u002Fvue","templates\u002Fvue",[2053,2054],{"title":1915,"path":1910,"stem":1916,"children":-1},{"title":1919,"path":1920,"stem":1921,"children":-1},[2056,2063],{"_path":1910,"title":1915,"description":2057,"image":2058,"category":1753,"tags":2061,"duration":250,"publishedAt":2062},"Some useful Docker commands for managing containers and images.",{"src":2059,"alt":2060},"https:\u002F\u002Fraw.githubusercontent.com\u002Ffullstack-core\u002Fblog\u002Frefs\u002Fheads\u002Fmain\u002Fblog\u002Fcover\u002Fdocker-commands.webp","Docker image",[1753,1766],"2025-02-05",{"_path":1920,"title":1919,"description":2064,"image":2065,"category":1753,"tags":2067,"duration":205,"publishedAt":2068},"How to run Docker Desktop on Window systems with WSL 2",{"src":2066,"alt":2060},"https:\u002F\u002Fraw.githubusercontent.com\u002Ffullstack-core\u002Fblog\u002Frefs\u002Fheads\u002Fmain\u002Fblog\u002Fcover\u002Fsetup-docker-on-window.webp",[1753,1766],"2025-01-20"]