[{"data":1,"prerenderedAt":185},["ShallowReactive",2],{"term-d\u002Fdockerfile":3,"related-d\u002Fdockerfile":171},{"id":4,"title":5,"acronym":6,"body":7,"category":153,"description":154,"difficulty":155,"extension":156,"letter":157,"meta":158,"navigation":77,"path":159,"related":160,"seo":165,"sitemap":166,"stem":169,"subcategory":6,"__hash__":170},"terms\u002Fterms\u002Fd\u002Fdockerfile.md","Dockerfile",null,{"type":8,"value":9,"toc":147},"minimark",[10,15,19,23,51,55,136,140,143],[11,12,14],"h2",{"id":13},"eli5-the-vibe-check","ELI5 — The Vibe Check",[16,17,18],"p",{},"A Dockerfile is the recipe for building a Docker image. It's a text file with step-by-step instructions: start from this base OS, install these tools, copy in my code, run this command to start. Docker reads the recipe and bakes your image. Change the recipe, get a different image.",[11,20,22],{"id":21},"real-talk","Real Talk",[16,24,25,26,30,31,34,35,38,39,42,43,46,47,50],{},"A Dockerfile is a text file containing sequential instructions for building a container image. Each instruction creates a new immutable layer. Common instructions include ",[27,28,29],"code",{},"FROM"," (base image), ",[27,32,33],{},"RUN"," (execute commands), ",[27,36,37],{},"COPY"," (add files), ",[27,40,41],{},"ENV"," (set env vars), and ",[27,44,45],{},"CMD","\u002F",[27,48,49],{},"ENTRYPOINT"," (define startup command).",[11,52,54],{"id":53},"show-me-the-code","Show Me The Code",[56,57,62],"pre",{"className":58,"code":59,"language":60,"meta":61,"style":61},"language-docker shiki shiki-themes material-theme-lighter material-theme material-theme-palenight","FROM node:20-alpine\n\nWORKDIR \u002Fapp\n\nCOPY package*.json .\u002F\nRUN npm ci\n\nCOPY . .\nRUN npm run build\n\nEXPOSE 3000\nCMD [\"node\", \"dist\u002Findex.js\"]\n","docker","",[27,63,64,72,79,85,90,96,102,107,113,119,124,130],{"__ignoreMap":61},[65,66,69],"span",{"class":67,"line":68},"line",1,[65,70,71],{},"FROM node:20-alpine\n",[65,73,75],{"class":67,"line":74},2,[65,76,78],{"emptyLinePlaceholder":77},true,"\n",[65,80,82],{"class":67,"line":81},3,[65,83,84],{},"WORKDIR \u002Fapp\n",[65,86,88],{"class":67,"line":87},4,[65,89,78],{"emptyLinePlaceholder":77},[65,91,93],{"class":67,"line":92},5,[65,94,95],{},"COPY package*.json .\u002F\n",[65,97,99],{"class":67,"line":98},6,[65,100,101],{},"RUN npm ci\n",[65,103,105],{"class":67,"line":104},7,[65,106,78],{"emptyLinePlaceholder":77},[65,108,110],{"class":67,"line":109},8,[65,111,112],{},"COPY . .\n",[65,114,116],{"class":67,"line":115},9,[65,117,118],{},"RUN npm run build\n",[65,120,122],{"class":67,"line":121},10,[65,123,78],{"emptyLinePlaceholder":77},[65,125,127],{"class":67,"line":126},11,[65,128,129],{},"EXPOSE 3000\n",[65,131,133],{"class":67,"line":132},12,[65,134,135],{},"CMD [\"node\", \"dist\u002Findex.js\"]\n",[11,137,139],{"id":138},"when-youll-hear-this","When You'll Hear This",[16,141,142],{},"\"Write a Dockerfile so the app can run in any cloud environment.\" \u002F \"The Dockerfile is missing a COPY step — that's why the build is failing.\"",[144,145,146],"style",{},"html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}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":61,"searchDepth":74,"depth":74,"links":148},[149,150,151,152],{"id":13,"depth":74,"text":14},{"id":21,"depth":74,"text":22},{"id":53,"depth":74,"text":54},{"id":138,"depth":74,"text":139},"cicd","A Dockerfile is the recipe for building a Docker image.","beginner","md","d",{},"\u002Fterms\u002Fd\u002Fdockerfile",[161,162,163,164],"Docker","Image","Container","Build",{"title":5,"description":154},{"changefreq":167,"priority":168},"weekly",0.7,"terms\u002Fd\u002Fdockerfile","bgzIzKnpvFc_0gMr5Wl7beuHymnWc-qTcvR-B26T9s0",[172,176,179,182],{"title":164,"path":173,"acronym":6,"category":174,"difficulty":155,"description":175},"\u002Fterms\u002Fb\u002Fbuild","general","A build is the process of turning your development code into something a real computer or browser can run efficiently.",{"title":163,"path":177,"acronym":6,"category":153,"difficulty":155,"description":178},"\u002Fterms\u002Fc\u002Fcontainer","A container is a running instance of a Docker image — it's the lunchbox you made and actually opened to eat from.",{"title":161,"path":180,"acronym":6,"category":153,"difficulty":155,"description":181},"\u002Fterms\u002Fd\u002Fdocker","Docker is like a lunchbox for your app.",{"title":162,"path":183,"acronym":6,"category":153,"difficulty":155,"description":184},"\u002Fterms\u002Fi\u002Fimage","A Docker image is the blueprint or template for a container. It's like a frozen snapshot of your app and everything it needs to run.",1776518275028]