[{"data":1,"prerenderedAt":2140},["ShallowReactive",2],{"\u002Ffix-issues\u002Fflask-docker-container-not-starting-fix-guide":3},{"id":4,"title":5,"body":6,"description":2130,"extension":2131,"meta":2132,"navigation":57,"path":2136,"seo":2137,"stem":2138,"__hash__":2139},"content\u002Ffix-issues\u002Fflask-docker-container-not-starting-fix-guide.md","Flask Docker Container Not Starting (Fix Guide)",{"type":7,"value":8,"toc":2110},"minimark",[9,13,17,22,25,289,292,325,329,332,336,1534,1538,1629,1633,1636,1887,1889,1921,1925,2000,2004,2020,2024,2029,2032,2036,2039,2043,2046,2050,2056,2060,2063,2076,2079,2083,2086,2094,2097,2101,2106],[10,11,5],"h1",{"id":12},"flask-docker-container-not-starting-fix-guide",[14,15,16],"p",{},"If your Flask Docker container is not starting, restarting repeatedly, or exiting right after launch, this guide shows you how to identify the failure point and fix it step-by-step. The goal is to get the container running, verify the Flask app is reachable, and prevent the same startup issue in production.",[18,19,21],"h2",{"id":20},"quick-fix-quick-setup","Quick Fix \u002F Quick Setup",[14,23,24],{},"Start with the container state, logs, and startup command.",[26,27,32],"pre",{"className":28,"code":29,"language":30,"meta":31,"style":31},"language-bash shiki shiki-themes github-light github-dark","docker ps -a\n\ndocker logs --tail=200 \u003Ccontainer_name>\n\ndocker inspect \u003Ccontainer_name> --format '{{.State.Status}} {{.State.ExitCode}} {{.State.Error}}'\n\ndocker run --rm -it \u003Cimage_name> sh\n\n# inside the container, test the startup command manually\npython -m flask --app app routes || true\npython -m flask --app app run --host=0.0.0.0 --port=5000 || true\n\n# or, if using gunicorn\ngunicorn -b 0.0.0.0:5000 wsgi:app\n\n# validate compose or dockerfile inputs\ndocker compose config\n\ndocker exec -it \u003Crunning_container> env | sort\n","bash","",[33,34,35,52,59,84,89,112,117,143,148,155,182,207,212,218,233,238,244,255,260],"code",{"__ignoreMap":31},[36,37,40,44,48],"span",{"class":38,"line":39},"line",1,[36,41,43],{"class":42},"sScJk","docker",[36,45,47],{"class":46},"sZZnC"," ps",[36,49,51],{"class":50},"sj4cs"," -a\n",[36,53,55],{"class":38,"line":54},2,[36,56,58],{"emptyLinePlaceholder":57},true,"\n",[36,60,62,64,67,70,74,77,81],{"class":38,"line":61},3,[36,63,43],{"class":42},[36,65,66],{"class":46}," logs",[36,68,69],{"class":50}," --tail=200",[36,71,73],{"class":72},"szBVR"," \u003C",[36,75,76],{"class":46},"container_nam",[36,78,80],{"class":79},"sVt8B","e",[36,82,83],{"class":72},">\n",[36,85,87],{"class":38,"line":86},4,[36,88,58],{"emptyLinePlaceholder":57},[36,90,92,94,97,99,101,103,106,109],{"class":38,"line":91},5,[36,93,43],{"class":42},[36,95,96],{"class":46}," inspect",[36,98,73],{"class":72},[36,100,76],{"class":46},[36,102,80],{"class":79},[36,104,105],{"class":72},">",[36,107,108],{"class":50}," --format",[36,110,111],{"class":46}," '{{.State.Status}} {{.State.ExitCode}} {{.State.Error}}'\n",[36,113,115],{"class":38,"line":114},6,[36,116,58],{"emptyLinePlaceholder":57},[36,118,120,122,125,128,131,133,136,138,140],{"class":38,"line":119},7,[36,121,43],{"class":42},[36,123,124],{"class":46}," run",[36,126,127],{"class":50}," --rm",[36,129,130],{"class":50}," -it",[36,132,73],{"class":72},[36,134,135],{"class":46},"image_nam",[36,137,80],{"class":79},[36,139,105],{"class":72},[36,141,142],{"class":46}," sh\n",[36,144,146],{"class":38,"line":145},8,[36,147,58],{"emptyLinePlaceholder":57},[36,149,151],{"class":38,"line":150},9,[36,152,154],{"class":153},"sJ8bj","# inside the container, test the startup command manually\n",[36,156,158,161,164,167,170,173,176,179],{"class":38,"line":157},10,[36,159,160],{"class":42},"python",[36,162,163],{"class":50}," -m",[36,165,166],{"class":46}," flask",[36,168,169],{"class":50}," --app",[36,171,172],{"class":46}," app",[36,174,175],{"class":46}," routes",[36,177,178],{"class":72}," ||",[36,180,181],{"class":50}," true\n",[36,183,185,187,189,191,193,195,197,200,203,205],{"class":38,"line":184},11,[36,186,160],{"class":42},[36,188,163],{"class":50},[36,190,166],{"class":46},[36,192,169],{"class":50},[36,194,172],{"class":46},[36,196,124],{"class":46},[36,198,199],{"class":50}," --host=0.0.0.0",[36,201,202],{"class":50}," --port=5000",[36,204,178],{"class":72},[36,206,181],{"class":50},[36,208,210],{"class":38,"line":209},12,[36,211,58],{"emptyLinePlaceholder":57},[36,213,215],{"class":38,"line":214},13,[36,216,217],{"class":153},"# or, if using gunicorn\n",[36,219,221,224,227,230],{"class":38,"line":220},14,[36,222,223],{"class":42},"gunicorn",[36,225,226],{"class":50}," -b",[36,228,229],{"class":46}," 0.0.0.0:5000",[36,231,232],{"class":46}," wsgi:app\n",[36,234,236],{"class":38,"line":235},15,[36,237,58],{"emptyLinePlaceholder":57},[36,239,241],{"class":38,"line":240},16,[36,242,243],{"class":153},"# validate compose or dockerfile inputs\n",[36,245,247,249,252],{"class":38,"line":246},17,[36,248,43],{"class":42},[36,250,251],{"class":46}," compose",[36,253,254],{"class":46}," config\n",[36,256,258],{"class":38,"line":257},18,[36,259,58],{"emptyLinePlaceholder":57},[36,261,263,265,268,270,272,275,278,280,283,286],{"class":38,"line":262},19,[36,264,43],{"class":42},[36,266,267],{"class":46}," exec",[36,269,130],{"class":50},[36,271,73],{"class":72},[36,273,274],{"class":46},"running_containe",[36,276,277],{"class":79},"r",[36,279,105],{"class":72},[36,281,282],{"class":46}," env",[36,284,285],{"class":72}," |",[36,287,288],{"class":42}," sort\n",[14,290,291],{},"Most startup failures come from one of these:",[293,294,295,306,309,312,315],"ul",{},[296,297,298,299,302,303],"li",{},"incorrect ",[33,300,301],{},"CMD"," or ",[33,304,305],{},"ENTRYPOINT",[296,307,308],{},"missing Python dependencies",[296,310,311],{},"wrong Flask or gunicorn import path",[296,313,314],{},"missing environment variables",[296,316,317,318,321,322],{},"app binding to ",[33,319,320],{},"127.0.0.1"," instead of ",[33,323,324],{},"0.0.0.0",[18,326,328],{"id":327},"whats-happening","What’s Happening",[14,330,331],{},"A Docker container stays running only while its main process stays alive. If your Flask app crashes during import, startup, or dependency initialization, the main process exits and the container stops or restarts. In other cases, the container may be running but the app is unreachable because it is bound to the wrong interface or port.",[18,333,335],{"id":334},"step-by-step-guide","Step-by-Step Guide",[337,338,339,404,469,545,608,684,763,855,975,1031,1110,1192,1237,1289,1318,1442],"ol",{},[296,340,341,345,348,349,381,383,384],{},[342,343,344],"strong",{},"Check the container state and exit code",[346,347],"br",{},"Run:",[26,350,352],{"className":28,"code":351,"language":30,"meta":31,"style":31},"docker ps -a\ndocker inspect \u003Ccontainer_name> --format '{{.State.Status}} {{.State.ExitCode}} {{.State.OOMKilled}} {{.State.Error}}'\n",[33,353,354,362],{"__ignoreMap":31},[36,355,356,358,360],{"class":38,"line":39},[36,357,43],{"class":42},[36,359,47],{"class":46},[36,361,51],{"class":50},[36,363,364,366,368,370,372,374,376,378],{"class":38,"line":54},[36,365,43],{"class":42},[36,367,96],{"class":46},[36,369,73],{"class":72},[36,371,76],{"class":46},[36,373,80],{"class":79},[36,375,105],{"class":72},[36,377,108],{"class":50},[36,379,380],{"class":46}," '{{.State.Status}} {{.State.ExitCode}} {{.State.OOMKilled}} {{.State.Error}}'\n",[346,382],{},"What to look for:",[293,385,386,392,398],{},[296,387,388,391],{},[33,389,390],{},"Exited"," with non-zero exit code: startup failure",[296,393,394,397],{},[33,395,396],{},"Restarting",": process is failing and restart policy is retrying",[296,399,400,403],{},[33,401,402],{},"OOMKilled=true",": memory pressure killed the process",[296,405,406,409,348,411,432,434,435,461],{},[342,407,408],{},"Read the container logs first",[346,410],{},[26,412,414],{"className":28,"code":413,"language":30,"meta":31,"style":31},"docker logs --tail=200 \u003Ccontainer_name>\n",[33,415,416],{"__ignoreMap":31},[36,417,418,420,422,424,426,428,430],{"class":38,"line":39},[36,419,43],{"class":42},[36,421,66],{"class":46},[36,423,69],{"class":50},[36,425,73],{"class":72},[36,427,76],{"class":46},[36,429,80],{"class":79},[36,431,83],{"class":72},[346,433],{},"Common failures:",[293,436,437,442,447,452,455,458],{},[296,438,439],{},[33,440,441],{},"ModuleNotFoundError",[296,443,444],{},[33,445,446],{},"ImportError",[296,448,449],{},[33,450,451],{},"KeyError",[296,453,454],{},"syntax errors",[296,456,457],{},"database connection failures",[296,459,460],{},"gunicorn errors such as:",[26,462,467],{"className":463,"code":465,"language":466,"meta":31},[464],"language-text","Failed to find attribute 'app' in 'wsgi'\n","text",[33,468,465],{"__ignoreMap":31},[296,470,471,474,476,477,302,479,481,482,484,485,538,540,541,544],{},[342,472,473],{},"Verify the startup command",[346,475],{},"Check your Dockerfile ",[33,478,301],{},[33,480,305],{},". For production, use gunicorn instead of the Flask development server.",[346,483],{},"Example Dockerfile:",[26,486,490],{"className":487,"code":488,"language":489,"meta":31,"style":31},"language-dockerfile shiki shiki-themes github-light github-dark","FROM python:3.12-slim\n\nWORKDIR \u002Fapp\n\nCOPY requirements.txt .\nRUN pip install --no-cache-dir -r requirements.txt\n\nCOPY . .\n\nCMD [\"gunicorn\", \"-b\", \"0.0.0.0:5000\", \"wsgi:app\"]\n","dockerfile",[33,491,492,497,501,506,510,515,520,524,529,533],{"__ignoreMap":31},[36,493,494],{"class":38,"line":39},[36,495,496],{},"FROM python:3.12-slim\n",[36,498,499],{"class":38,"line":54},[36,500,58],{"emptyLinePlaceholder":57},[36,502,503],{"class":38,"line":61},[36,504,505],{},"WORKDIR \u002Fapp\n",[36,507,508],{"class":38,"line":86},[36,509,58],{"emptyLinePlaceholder":57},[36,511,512],{"class":38,"line":91},[36,513,514],{},"COPY requirements.txt .\n",[36,516,517],{"class":38,"line":114},[36,518,519],{},"RUN pip install --no-cache-dir -r requirements.txt\n",[36,521,522],{"class":38,"line":119},[36,523,58],{"emptyLinePlaceholder":57},[36,525,526],{"class":38,"line":145},[36,527,528],{},"COPY . .\n",[36,530,531],{"class":38,"line":150},[36,532,58],{"emptyLinePlaceholder":57},[36,534,535],{"class":38,"line":157},[36,536,537],{},"CMD [\"gunicorn\", \"-b\", \"0.0.0.0:5000\", \"wsgi:app\"]\n",[346,539],{},"If you use Compose, also inspect the service ",[33,542,543],{},"command:"," because it can override the image default.",[296,546,547,550,348,552,577,579,580,605,607],{},[342,548,549],{},"Open a shell in the image and test startup manually",[346,551],{},[26,553,555],{"className":28,"code":554,"language":30,"meta":31,"style":31},"docker run --rm -it \u003Cimage_name> sh\n",[33,556,557],{"__ignoreMap":31},[36,558,559,561,563,565,567,569,571,573,575],{"class":38,"line":39},[36,560,43],{"class":42},[36,562,124],{"class":46},[36,564,127],{"class":50},[36,566,130],{"class":50},[36,568,73],{"class":72},[36,570,135],{"class":46},[36,572,80],{"class":79},[36,574,105],{"class":72},[36,576,142],{"class":46},[346,578],{},"Then test:",[26,581,583],{"className":28,"code":582,"language":30,"meta":31,"style":31},"python -c \"from wsgi import app; print(app)\"\ngunicorn -b 0.0.0.0:5000 wsgi:app\n",[33,584,585,595],{"__ignoreMap":31},[36,586,587,589,592],{"class":38,"line":39},[36,588,160],{"class":42},[36,590,591],{"class":50}," -c",[36,593,594],{"class":46}," \"from wsgi import app; print(app)\"\n",[36,596,597,599,601,603],{"class":38,"line":54},[36,598,223],{"class":42},[36,600,226],{"class":50},[36,602,229],{"class":46},[36,604,232],{"class":46},[346,606],{},"This isolates image-level problems from Compose or orchestration issues.",[296,609,610,613,615,616,618,619,656,658,659,681,683],{},[342,611,612],{},"Confirm the Flask app import path",[346,614],{},"Gunicorn must point to the correct module and app object.",[346,617],{},"Common patterns:",[26,620,622],{"className":28,"code":621,"language":30,"meta":31,"style":31},"gunicorn -b 0.0.0.0:5000 wsgi:app\ngunicorn -b 0.0.0.0:5000 app:app\ngunicorn -b 0.0.0.0:5000 'app:create_app()'\n",[33,623,624,634,645],{"__ignoreMap":31},[36,625,626,628,630,632],{"class":38,"line":39},[36,627,223],{"class":42},[36,629,226],{"class":50},[36,631,229],{"class":46},[36,633,232],{"class":46},[36,635,636,638,640,642],{"class":38,"line":54},[36,637,223],{"class":42},[36,639,226],{"class":50},[36,641,229],{"class":46},[36,643,644],{"class":46}," app:app\n",[36,646,647,649,651,653],{"class":38,"line":61},[36,648,223],{"class":42},[36,650,226],{"class":50},[36,652,229],{"class":46},[36,654,655],{"class":46}," 'app:create_app()'\n",[346,657],{},"Test imports directly:",[26,660,662],{"className":28,"code":661,"language":30,"meta":31,"style":31},"python -c \"from wsgi import app; print(app)\"\npython -c \"from app import app; print(app)\"\n",[33,663,664,672],{"__ignoreMap":31},[36,665,666,668,670],{"class":38,"line":39},[36,667,160],{"class":42},[36,669,591],{"class":50},[36,671,594],{"class":46},[36,673,674,676,678],{"class":38,"line":54},[36,675,160],{"class":42},[36,677,591],{"class":50},[36,679,680],{"class":46}," \"from app import app; print(app)\"\n",[346,682],{},"If your app uses a factory, verify the callable exists and returns a valid Flask app.",[296,685,686,689,691,692,717,719,720,734],{},[342,687,688],{},"Verify dependencies are installed",[346,690],{},"Inside the container:",[26,693,695],{"className":28,"code":694,"language":30,"meta":31,"style":31},"pip show flask gunicorn\npip freeze\n",[33,696,697,710],{"__ignoreMap":31},[36,698,699,702,705,707],{"class":38,"line":39},[36,700,701],{"class":42},"pip",[36,703,704],{"class":46}," show",[36,706,166],{"class":46},[36,708,709],{"class":46}," gunicorn\n",[36,711,712,714],{"class":38,"line":54},[36,713,701],{"class":42},[36,715,716],{"class":46}," freeze\n",[346,718],{},"If required packages are missing:",[293,721,722,731],{},[296,723,724,725,302,728],{},"update ",[33,726,727],{},"requirements.txt",[33,729,730],{},"pyproject.toml",[296,732,733],{},"rebuild the image without cache",[26,735,737],{"className":28,"code":736,"language":30,"meta":31,"style":31},"docker build --no-cache -t \u003Cimage_name> .\n",[33,738,739],{"__ignoreMap":31},[36,740,741,743,746,749,752,754,756,758,760],{"class":38,"line":39},[36,742,43],{"class":42},[36,744,745],{"class":46}," build",[36,747,748],{"class":50}," --no-cache",[36,750,751],{"class":50}," -t",[36,753,73],{"class":72},[36,755,135],{"class":46},[36,757,80],{"class":79},[36,759,105],{"class":72},[36,761,762],{"class":46}," .\n",[296,764,765,768,691,770,812,814,815,834,836,837],{},[342,766,767],{},"Check the working directory and copied files",[346,769],{},[26,771,773],{"className":28,"code":772,"language":30,"meta":31,"style":31},"pwd\nls -la\nfind . -maxdepth 2 -type f | sort\n",[33,774,775,780,788],{"__ignoreMap":31},[36,776,777],{"class":38,"line":39},[36,778,779],{"class":50},"pwd\n",[36,781,782,785],{"class":38,"line":54},[36,783,784],{"class":42},"ls",[36,786,787],{"class":50}," -la\n",[36,789,790,793,796,799,802,805,808,810],{"class":38,"line":61},[36,791,792],{"class":42},"find",[36,794,795],{"class":46}," .",[36,797,798],{"class":50}," -maxdepth",[36,800,801],{"class":50}," 2",[36,803,804],{"class":50}," -type",[36,806,807],{"class":46}," f",[36,809,285],{"class":72},[36,811,288],{"class":42},[346,813],{},"Confirm these exist where expected:",[293,816,817,820,825,828,831],{},[296,818,819],{},"application source files",[296,821,822],{},[33,823,824],{},"wsgi.py",[296,826,827],{},"templates",[296,829,830],{},"static assets",[296,832,833],{},"config files",[346,835],{},"If files are missing, review:",[293,838,839,844,850],{},[296,840,841],{},[33,842,843],{},"WORKDIR",[296,845,846,849],{},[33,847,848],{},"COPY"," instructions",[296,851,852],{},[33,853,854],{},".dockerignore",[296,856,857,860,862,863,348,865,879,881,882,902,904,905,966,968,969,974],{},[342,858,859],{},"Verify environment variables",[346,861],{},"Missing runtime variables often crash the app during import or configuration.",[346,864],{},[26,866,868],{"className":28,"code":867,"language":30,"meta":31,"style":31},"env | sort\n",[33,869,870],{"__ignoreMap":31},[36,871,872,875,877],{"class":38,"line":39},[36,873,874],{"class":42},"env",[36,876,285],{"class":72},[36,878,288],{"class":42},[346,880],{},"Confirm required values such as:",[293,883,884,889,894,899],{},[296,885,886],{},[33,887,888],{},"SECRET_KEY",[296,890,891],{},[33,892,893],{},"DATABASE_URL",[296,895,896],{},[33,897,898],{},"REDIS_URL",[296,900,901],{},"app-specific settings",[346,903],{},"Compose example:",[26,906,910],{"className":907,"code":908,"language":909,"meta":31,"style":31},"language-yaml shiki shiki-themes github-light github-dark","services:\n  web:\n    image: myflaskapp:latest\n    environment:\n      SECRET_KEY: change-me\n      DATABASE_URL: postgresql:\u002F\u002Fuser:pass@db:5432\u002Fapp\n","yaml",[33,911,912,921,928,939,946,956],{"__ignoreMap":31},[36,913,914,918],{"class":38,"line":39},[36,915,917],{"class":916},"s9eBZ","services",[36,919,920],{"class":79},":\n",[36,922,923,926],{"class":38,"line":54},[36,924,925],{"class":916},"  web",[36,927,920],{"class":79},[36,929,930,933,936],{"class":38,"line":61},[36,931,932],{"class":916},"    image",[36,934,935],{"class":79},": ",[36,937,938],{"class":46},"myflaskapp:latest\n",[36,940,941,944],{"class":38,"line":86},[36,942,943],{"class":916},"    environment",[36,945,920],{"class":79},[36,947,948,951,953],{"class":38,"line":91},[36,949,950],{"class":916},"      SECRET_KEY",[36,952,935],{"class":79},[36,954,955],{"class":46},"change-me\n",[36,957,958,961,963],{"class":38,"line":114},[36,959,960],{"class":916},"      DATABASE_URL",[36,962,935],{"class":79},[36,964,965],{"class":46},"postgresql:\u002F\u002Fuser:pass@db:5432\u002Fapp\n",[346,967],{},"If variables are not loading correctly, see ",[970,971,973],"a",{"href":972},"\u002Ffix-issues\u002Fflask-environment-variables-not-loading-in-production","Flask Environment Variables Not Loading in Production",".",[296,976,977,980,982,983,985,986,988,989,1004,1006,1007],{},[342,978,979],{},"Confirm the app binds to all interfaces",[346,981],{},"If the app listens on ",[33,984,320],{},", Docker port publishing will not expose it correctly.",[346,987],{},"Correct:",[26,990,992],{"className":28,"code":991,"language":30,"meta":31,"style":31},"gunicorn -b 0.0.0.0:5000 wsgi:app\n",[33,993,994],{"__ignoreMap":31},[36,995,996,998,1000,1002],{"class":38,"line":39},[36,997,223],{"class":42},[36,999,226],{"class":50},[36,1001,229],{"class":46},[36,1003,232],{"class":46},[346,1005],{},"For temporary testing only:",[26,1008,1010],{"className":28,"code":1009,"language":30,"meta":31,"style":31},"python -m flask --app app run --host=0.0.0.0 --port=5000\n",[33,1011,1012],{"__ignoreMap":31},[36,1013,1014,1016,1018,1020,1022,1024,1026,1028],{"class":38,"line":39},[36,1015,160],{"class":42},[36,1017,163],{"class":50},[36,1019,166],{"class":46},[36,1021,169],{"class":50},[36,1023,172],{"class":46},[36,1025,124],{"class":46},[36,1027,199],{"class":50},[36,1029,1030],{"class":50}," --port=5000\n",[296,1032,1033,1036,1038,1039,1064,1066,1067,1099,1101,1102],{},[342,1034,1035],{},"Check exposed and published ports",[346,1037],{},"If using Docker directly:",[26,1040,1042],{"className":28,"code":1041,"language":30,"meta":31,"style":31},"docker run -p 5000:5000 \u003Cimage_name>\n",[33,1043,1044],{"__ignoreMap":31},[36,1045,1046,1048,1050,1053,1056,1058,1060,1062],{"class":38,"line":39},[36,1047,43],{"class":42},[36,1049,124],{"class":46},[36,1051,1052],{"class":50}," -p",[36,1054,1055],{"class":46}," 5000:5000",[36,1057,73],{"class":72},[36,1059,135],{"class":46},[36,1061,80],{"class":79},[36,1063,83],{"class":72},[346,1065],{},"If using Compose:",[26,1068,1070],{"className":907,"code":1069,"language":909,"meta":31,"style":31},"services:\n  web:\n    ports:\n      - \"5000:5000\"\n",[33,1071,1072,1078,1084,1091],{"__ignoreMap":31},[36,1073,1074,1076],{"class":38,"line":39},[36,1075,917],{"class":916},[36,1077,920],{"class":79},[36,1079,1080,1082],{"class":38,"line":54},[36,1081,925],{"class":916},[36,1083,920],{"class":79},[36,1085,1086,1089],{"class":38,"line":61},[36,1087,1088],{"class":916},"    ports",[36,1090,920],{"class":79},[36,1092,1093,1096],{"class":38,"line":86},[36,1094,1095],{"class":79},"      - ",[36,1097,1098],{"class":46},"\"5000:5000\"\n",[346,1100],{},"Validate that:",[293,1103,1104,1107],{},[296,1105,1106],{},"the app listens on the same container port you publish",[296,1108,1109],{},"upstream reverse proxy config points to the same port",[296,1111,1112,1115,348,1117,1130,1132,1133,1155,1157,1158],{},[342,1113,1114],{},"Validate Docker Compose configuration",[346,1116],{},[26,1118,1120],{"className":28,"code":1119,"language":30,"meta":31,"style":31},"docker compose config\n",[33,1121,1122],{"__ignoreMap":31},[36,1123,1124,1126,1128],{"class":38,"line":39},[36,1125,43],{"class":42},[36,1127,251],{"class":46},[36,1129,254],{"class":46},[346,1131],{},"Review the merged output for:",[293,1134,1135,1140,1146,1149,1152],{},[296,1136,298,1137],{},[33,1138,1139],{},"command",[296,1141,1142,1143],{},"wrong ",[33,1144,1145],{},"env_file",[296,1147,1148],{},"invalid volume mounts",[296,1150,1151],{},"missing networks",[296,1153,1154],{},"broken health checks",[346,1156],{},"Also inspect service state:",[26,1159,1161],{"className":28,"code":1160,"language":30,"meta":31,"style":31},"docker compose ps\ndocker compose logs -f \u003Cservice_name>\n",[33,1162,1163,1172],{"__ignoreMap":31},[36,1164,1165,1167,1169],{"class":38,"line":39},[36,1166,43],{"class":42},[36,1168,251],{"class":46},[36,1170,1171],{"class":46}," ps\n",[36,1173,1174,1176,1178,1180,1183,1185,1188,1190],{"class":38,"line":54},[36,1175,43],{"class":42},[36,1177,251],{"class":46},[36,1179,66],{"class":46},[36,1181,1182],{"class":50}," -f",[36,1184,73],{"class":72},[36,1186,1187],{"class":46},"service_nam",[36,1189,80],{"class":79},[36,1191,83],{"class":72},[296,1193,1194,1197,1199,1200,1202,1203,1234,1236],{},[342,1195,1196],{},"Test for broken volume mounts",[346,1198],{},"A bind mount can hide files copied into the image.",[346,1201],{},"Problem example:",[26,1204,1206],{"className":907,"code":1205,"language":909,"meta":31,"style":31},"services:\n  web:\n    volumes:\n      - .:\u002Fapp\n",[33,1207,1208,1214,1220,1227],{"__ignoreMap":31},[36,1209,1210,1212],{"class":38,"line":39},[36,1211,917],{"class":916},[36,1213,920],{"class":79},[36,1215,1216,1218],{"class":38,"line":54},[36,1217,925],{"class":916},[36,1219,920],{"class":79},[36,1221,1222,1225],{"class":38,"line":61},[36,1223,1224],{"class":916},"    volumes",[36,1226,920],{"class":79},[36,1228,1229,1231],{"class":38,"line":86},[36,1230,1095],{"class":79},[36,1232,1233],{"class":46},".:\u002Fapp\n",[346,1235],{},"If your local directory does not contain the same files as the image, startup can fail. Temporarily remove the volume and start again.",[296,1238,1239,1242,1244,1245,1247,1248,1263,1265,1266,1277,1279,1280],{},[342,1240,1241],{},"Check permissions and runtime user",[346,1243],{},"If the container uses a non-root user, verify it can read application files and write required paths.",[346,1246],{},"Example:",[26,1249,1251],{"className":487,"code":1250,"language":489,"meta":31,"style":31},"RUN useradd -m appuser\nUSER appuser\n",[33,1252,1253,1258],{"__ignoreMap":31},[36,1254,1255],{"class":38,"line":39},[36,1256,1257],{},"RUN useradd -m appuser\n",[36,1259,1260],{"class":38,"line":54},[36,1261,1262],{},"USER appuser\n",[346,1264],{},"Validate ownership and permissions:",[26,1267,1269],{"className":28,"code":1268,"language":30,"meta":31,"style":31},"ls -la\n",[33,1270,1271],{"__ignoreMap":31},[36,1272,1273,1275],{"class":38,"line":39},[36,1274,784],{"class":42},[36,1276,787],{"class":50},[346,1278],{},"If needed:",[26,1281,1283],{"className":487,"code":1282,"language":489,"meta":31,"style":31},"RUN chown -R appuser:appuser \u002Fapp\n",[33,1284,1285],{"__ignoreMap":31},[36,1286,1287],{"class":38,"line":39},[36,1288,1282],{},[296,1290,1291,1294,1296,1297,1299,1300,1311,1313,1314,974],{},[342,1292,1293],{},"Check database and dependency readiness",[346,1295],{},"The app may exit if PostgreSQL, MySQL, Redis, or another service is unavailable at startup.",[346,1298],{},"Test connectivity from inside the container where possible, or verify hostnames and ports in environment variables. If the app fails only after the container starts, you may need:",[293,1301,1302,1305,1308],{},[296,1303,1304],{},"retry logic",[296,1306,1307],{},"startup backoff",[296,1309,1310],{},"proper service readiness checks",[346,1312],{},"If startup succeeds but requests fail later with server errors, see ",[970,1315,1317],{"href":1316},"\u002Ffix-issues\u002Fflask-500-internal-server-error-in-production","Flask 500 Internal Server Error in Production",[296,1319,1320,1323,1325,1326,1328,1329,1353,904,1355,1439,1441],{},[342,1321,1322],{},"Inspect health checks",[346,1324],{},"A bad health check can mark a healthy container as unhealthy or trigger restarts.",[346,1327],{},"Inspect health output:",[26,1330,1332],{"className":28,"code":1331,"language":30,"meta":31,"style":31},"docker inspect \u003Ccontainer_name> --format '{{json .State.Health}}'\n",[33,1333,1334],{"__ignoreMap":31},[36,1335,1336,1338,1340,1342,1344,1346,1348,1350],{"class":38,"line":39},[36,1337,43],{"class":42},[36,1339,96],{"class":46},[36,1341,73],{"class":72},[36,1343,76],{"class":46},[36,1345,80],{"class":79},[36,1347,105],{"class":72},[36,1349,108],{"class":50},[36,1351,1352],{"class":46}," '{{json .State.Health}}'\n",[346,1354],{},[26,1356,1358],{"className":907,"code":1357,"language":909,"meta":31,"style":31},"services:\n  web:\n    healthcheck:\n      test: [\"CMD\", \"curl\", \"-f\", \"http:\u002F\u002Flocalhost:5000\u002Fhealth\"]\n      interval: 30s\n      timeout: 5s\n      retries: 3\n",[33,1359,1360,1366,1372,1379,1409,1419,1429],{"__ignoreMap":31},[36,1361,1362,1364],{"class":38,"line":39},[36,1363,917],{"class":916},[36,1365,920],{"class":79},[36,1367,1368,1370],{"class":38,"line":54},[36,1369,925],{"class":916},[36,1371,920],{"class":79},[36,1373,1374,1377],{"class":38,"line":61},[36,1375,1376],{"class":916},"    healthcheck",[36,1378,920],{"class":79},[36,1380,1381,1384,1387,1390,1393,1396,1398,1401,1403,1406],{"class":38,"line":86},[36,1382,1383],{"class":916},"      test",[36,1385,1386],{"class":79},": [",[36,1388,1389],{"class":46},"\"CMD\"",[36,1391,1392],{"class":79},", ",[36,1394,1395],{"class":46},"\"curl\"",[36,1397,1392],{"class":79},[36,1399,1400],{"class":46},"\"-f\"",[36,1402,1392],{"class":79},[36,1404,1405],{"class":46},"\"http:\u002F\u002Flocalhost:5000\u002Fhealth\"",[36,1407,1408],{"class":79},"]\n",[36,1410,1411,1414,1416],{"class":38,"line":91},[36,1412,1413],{"class":916},"      interval",[36,1415,935],{"class":79},[36,1417,1418],{"class":46},"30s\n",[36,1420,1421,1424,1426],{"class":38,"line":114},[36,1422,1423],{"class":916},"      timeout",[36,1425,935],{"class":79},[36,1427,1428],{"class":46},"5s\n",[36,1430,1431,1434,1436],{"class":38,"line":119},[36,1432,1433],{"class":916},"      retries",[36,1435,935],{"class":79},[36,1437,1438],{"class":50},"3\n",[346,1440],{},"Confirm the endpoint exists and returns a successful HTTP response.",[296,1443,1444,1447,1449,1450,1478,1480,1481,1527,1529,1530,1533],{},[342,1445,1446],{},"Rebuild cleanly after fixes",[346,1448],{},"After changing dependencies, Dockerfile instructions, or app files, rebuild without cache:",[26,1451,1453],{"className":28,"code":1452,"language":30,"meta":31,"style":31},"docker compose build --no-cache\ndocker compose up -d\n",[33,1454,1455,1466],{"__ignoreMap":31},[36,1456,1457,1459,1461,1463],{"class":38,"line":39},[36,1458,43],{"class":42},[36,1460,251],{"class":46},[36,1462,745],{"class":46},[36,1464,1465],{"class":50}," --no-cache\n",[36,1467,1468,1470,1472,1475],{"class":38,"line":54},[36,1469,43],{"class":42},[36,1471,251],{"class":46},[36,1473,1474],{"class":46}," up",[36,1476,1477],{"class":50}," -d\n",[346,1479],{},"Or with raw Docker:",[26,1482,1484],{"className":28,"code":1483,"language":30,"meta":31,"style":31},"docker build --no-cache -t \u003Cimage_name> .\ndocker run -d -p 5000:5000 \u003Cimage_name>\n",[33,1485,1486,1506],{"__ignoreMap":31},[36,1487,1488,1490,1492,1494,1496,1498,1500,1502,1504],{"class":38,"line":39},[36,1489,43],{"class":42},[36,1491,745],{"class":46},[36,1493,748],{"class":50},[36,1495,751],{"class":50},[36,1497,73],{"class":72},[36,1499,135],{"class":46},[36,1501,80],{"class":79},[36,1503,105],{"class":72},[36,1505,762],{"class":46},[36,1507,1508,1510,1512,1515,1517,1519,1521,1523,1525],{"class":38,"line":54},[36,1509,43],{"class":42},[36,1511,124],{"class":46},[36,1513,1514],{"class":50}," -d",[36,1516,1052],{"class":50},[36,1518,1055],{"class":46},[36,1520,73],{"class":72},[36,1522,135],{"class":46},[36,1524,80],{"class":79},[36,1526,83],{"class":72},[346,1528],{},"Then verify the container remains in ",[33,1531,1532],{},"Up"," state.",[18,1535,1537],{"id":1536},"common-causes","Common Causes",[293,1539,1540,1550,1560,1566,1577,1583,1589,1599,1605,1611,1617,1623],{},[296,1541,1542,1549],{},[342,1543,1544,1545,302,1547],{},"Incorrect ",[33,1546,301],{},[33,1548,305],{}," → Docker starts the wrong process or no long-running process → set a valid gunicorn or app startup command.",[296,1551,1552,1555,1556,1559],{},[342,1553,1554],{},"Wrong gunicorn app path"," → gunicorn cannot import the Flask app object → fix ",[33,1557,1558],{},"wsgi:app"," or factory syntax.",[296,1561,1562,1565],{},[342,1563,1564],{},"Missing Python dependencies"," → imports fail at startup → update dependency files and rebuild the image.",[296,1567,1568,1571,1572,1574,1575,974],{},[342,1569,1570],{},"Application code not copied into the image"," → required files are missing at runtime → fix ",[33,1573,848],{}," instructions and ",[33,1576,854],{},[296,1578,1579,1582],{},[342,1580,1581],{},"Bind mount hides application files"," → local volume overlays built image contents → remove or correct the mount path.",[296,1584,1585,1588],{},[342,1586,1587],{},"Required environment variables missing"," → app crashes during configuration or import → define variables in Compose, env files, or runtime flags.",[296,1590,1591,1596,1597,974],{},[342,1592,1593,1594],{},"App binds to ",[33,1595,320],{}," → service is not reachable through Docker networking → bind to ",[33,1598,324],{},[296,1600,1601,1604],{},[342,1602,1603],{},"Wrong port mapping"," → host traffic goes to the wrong container port → align published ports with the actual app bind port.",[296,1606,1607,1610],{},[342,1608,1609],{},"Database or Redis unavailable during startup"," → app exits when dependency checks fail → test connectivity and add retry handling.",[296,1612,1613,1616],{},[342,1614,1615],{},"Permissions or non-root user issues"," → app cannot read files or write needed paths → correct ownership and runtime user settings.",[296,1618,1619,1622],{},[342,1620,1621],{},"Health check command is wrong"," → Docker or an orchestrator marks the container unhealthy → fix the health check endpoint and command.",[296,1624,1625,1628],{},[342,1626,1627],{},"Out-of-memory kill"," → container stops under memory pressure → reduce memory usage or increase limits.",[18,1630,1632],{"id":1631},"debugging-section","Debugging Section",[14,1634,1635],{},"Use these commands in order.",[26,1637,1639],{"className":28,"code":1638,"language":30,"meta":31,"style":31},"docker ps -a\ndocker logs --tail=200 \u003Ccontainer_name>\ndocker inspect \u003Ccontainer_name> --format '{{.State.Status}} {{.State.ExitCode}} {{.State.OOMKilled}} {{.State.Error}}'\ndocker inspect \u003Ccontainer_name>\ndocker image inspect \u003Cimage_name>\ndocker run --rm -it --entrypoint sh \u003Cimage_name>\ndocker compose ps\ndocker compose logs -f \u003Cservice_name>\ndocker compose config\ndocker exec -it \u003Ccontainer_name> env | sort\ndocker exec -it \u003Ccontainer_name> sh -lc 'pwd && ls -la'\ndocker exec -it \u003Ccontainer_name> sh -lc 'python -c \"from wsgi import app; print(app)\"'\ndocker exec -it \u003Ccontainer_name> sh -lc 'pip freeze'\ndocker exec -it \u003Ccontainer_name> sh -lc 'ss -lntp || netstat -lntp'\n",[33,1640,1641,1649,1665,1683,1697,1714,1738,1746,1764,1772,1794,1818,1841,1864],{"__ignoreMap":31},[36,1642,1643,1645,1647],{"class":38,"line":39},[36,1644,43],{"class":42},[36,1646,47],{"class":46},[36,1648,51],{"class":50},[36,1650,1651,1653,1655,1657,1659,1661,1663],{"class":38,"line":54},[36,1652,43],{"class":42},[36,1654,66],{"class":46},[36,1656,69],{"class":50},[36,1658,73],{"class":72},[36,1660,76],{"class":46},[36,1662,80],{"class":79},[36,1664,83],{"class":72},[36,1666,1667,1669,1671,1673,1675,1677,1679,1681],{"class":38,"line":61},[36,1668,43],{"class":42},[36,1670,96],{"class":46},[36,1672,73],{"class":72},[36,1674,76],{"class":46},[36,1676,80],{"class":79},[36,1678,105],{"class":72},[36,1680,108],{"class":50},[36,1682,380],{"class":46},[36,1684,1685,1687,1689,1691,1693,1695],{"class":38,"line":86},[36,1686,43],{"class":42},[36,1688,96],{"class":46},[36,1690,73],{"class":72},[36,1692,76],{"class":46},[36,1694,80],{"class":79},[36,1696,83],{"class":72},[36,1698,1699,1701,1704,1706,1708,1710,1712],{"class":38,"line":91},[36,1700,43],{"class":42},[36,1702,1703],{"class":46}," image",[36,1705,96],{"class":46},[36,1707,73],{"class":72},[36,1709,135],{"class":46},[36,1711,80],{"class":79},[36,1713,83],{"class":72},[36,1715,1716,1718,1720,1722,1724,1727,1730,1732,1734,1736],{"class":38,"line":114},[36,1717,43],{"class":42},[36,1719,124],{"class":46},[36,1721,127],{"class":50},[36,1723,130],{"class":50},[36,1725,1726],{"class":50}," --entrypoint",[36,1728,1729],{"class":46}," sh",[36,1731,73],{"class":72},[36,1733,135],{"class":46},[36,1735,80],{"class":79},[36,1737,83],{"class":72},[36,1739,1740,1742,1744],{"class":38,"line":119},[36,1741,43],{"class":42},[36,1743,251],{"class":46},[36,1745,1171],{"class":46},[36,1747,1748,1750,1752,1754,1756,1758,1760,1762],{"class":38,"line":145},[36,1749,43],{"class":42},[36,1751,251],{"class":46},[36,1753,66],{"class":46},[36,1755,1182],{"class":50},[36,1757,73],{"class":72},[36,1759,1187],{"class":46},[36,1761,80],{"class":79},[36,1763,83],{"class":72},[36,1765,1766,1768,1770],{"class":38,"line":150},[36,1767,43],{"class":42},[36,1769,251],{"class":46},[36,1771,254],{"class":46},[36,1773,1774,1776,1778,1780,1782,1784,1786,1788,1790,1792],{"class":38,"line":157},[36,1775,43],{"class":42},[36,1777,267],{"class":46},[36,1779,130],{"class":50},[36,1781,73],{"class":72},[36,1783,76],{"class":46},[36,1785,80],{"class":79},[36,1787,105],{"class":72},[36,1789,282],{"class":46},[36,1791,285],{"class":72},[36,1793,288],{"class":42},[36,1795,1796,1798,1800,1802,1804,1806,1808,1810,1812,1815],{"class":38,"line":184},[36,1797,43],{"class":42},[36,1799,267],{"class":46},[36,1801,130],{"class":50},[36,1803,73],{"class":72},[36,1805,76],{"class":46},[36,1807,80],{"class":79},[36,1809,105],{"class":72},[36,1811,1729],{"class":46},[36,1813,1814],{"class":50}," -lc",[36,1816,1817],{"class":46}," 'pwd && ls -la'\n",[36,1819,1820,1822,1824,1826,1828,1830,1832,1834,1836,1838],{"class":38,"line":209},[36,1821,43],{"class":42},[36,1823,267],{"class":46},[36,1825,130],{"class":50},[36,1827,73],{"class":72},[36,1829,76],{"class":46},[36,1831,80],{"class":79},[36,1833,105],{"class":72},[36,1835,1729],{"class":46},[36,1837,1814],{"class":50},[36,1839,1840],{"class":46}," 'python -c \"from wsgi import app; print(app)\"'\n",[36,1842,1843,1845,1847,1849,1851,1853,1855,1857,1859,1861],{"class":38,"line":214},[36,1844,43],{"class":42},[36,1846,267],{"class":46},[36,1848,130],{"class":50},[36,1850,73],{"class":72},[36,1852,76],{"class":46},[36,1854,80],{"class":79},[36,1856,105],{"class":72},[36,1858,1729],{"class":46},[36,1860,1814],{"class":50},[36,1862,1863],{"class":46}," 'pip freeze'\n",[36,1865,1866,1868,1870,1872,1874,1876,1878,1880,1882,1884],{"class":38,"line":220},[36,1867,43],{"class":42},[36,1869,267],{"class":46},[36,1871,130],{"class":50},[36,1873,73],{"class":72},[36,1875,76],{"class":46},[36,1877,80],{"class":79},[36,1879,105],{"class":72},[36,1881,1729],{"class":46},[36,1883,1814],{"class":50},[36,1885,1886],{"class":46}," 'ss -lntp || netstat -lntp'\n",[14,1888,383],{},[293,1890,1891,1897,1906,1909,1912,1915,1918],{},[296,1892,1893,1896],{},[33,1894,1895],{},"ExitCode"," is non-zero",[296,1898,1899,1902,1903],{},[33,1900,1901],{},"OOMKilled"," is ",[33,1904,1905],{},"true",[296,1907,1908],{},"startup command does not match your actual app module",[296,1910,1911],{},"environment variables are missing",[296,1913,1914],{},"bind mounts hide source files",[296,1916,1917],{},"process is not listening on the expected port",[296,1919,1920],{},"health check output shows repeated failures",[18,1922,1924],{"id":1923},"checklist","Checklist",[293,1926,1929,1945,1955,1961,1967,1973,1982,1988,1994],{"className":1927},[1928],"contains-task-list",[296,1930,1933,1937,1938,1940,1941,302,1943],{"className":1931},[1932],"task-list-item",[1934,1935],"input",{"disabled":57,"type":1936},"checkbox"," Container state is ",[33,1939,1532],{},", not ",[33,1942,390],{},[33,1944,396],{},[296,1946,1948,1950,1951,1954],{"className":1947},[1932],[1934,1949],{"disabled":57,"type":1936}," ",[33,1952,1953],{},"docker logs"," shows the Flask app or gunicorn started without import errors",[296,1956,1958,1960],{"className":1957},[1932],[1934,1959],{"disabled":57,"type":1936}," Startup command points to the correct module and app object",[296,1962,1964,1966],{"className":1963},[1932],[1934,1965],{"disabled":57,"type":1936}," Required environment variables are present inside the container",[296,1968,1970,1972],{"className":1969},[1932],[1934,1971],{"disabled":57,"type":1936}," Application files exist in the expected working directory",[296,1974,1976,1978,1979,1981],{"className":1975},[1932],[1934,1977],{"disabled":57,"type":1936}," The app listens on ",[33,1980,324],{}," and the correct container port",[296,1983,1985,1987],{"className":1984},[1932],[1934,1986],{"disabled":57,"type":1936}," Port mapping or reverse proxy configuration matches the container port",[296,1989,1991,1993],{"className":1990},[1932],[1934,1992],{"disabled":57,"type":1936}," Database or dependent services are reachable at startup",[296,1995,1997,1999],{"className":1996},[1932],[1934,1998],{"disabled":57,"type":1936}," Health check passes if one is configured",[18,2001,2003],{"id":2002},"related-guides","Related Guides",[293,2005,2006,2010,2014],{},[296,2007,2008],{},[970,2009,973],{"href":972},[296,2011,2012],{},[970,2013,1317],{"href":1316},[296,2015,2016],{},[970,2017,2019],{"href":2018},"\u002Fchecklist\u002Fflask-production-checklist-everything-you-must-do","Flask Production Checklist (Everything You Must Do)",[18,2021,2023],{"id":2022},"faq","FAQ",[2025,2026,2028],"h3",{"id":2027},"why-does-the-container-exit-with-code-0","Why does the container exit with code 0?",[14,2030,2031],{},"The main process completed successfully and Docker had nothing left to run. This often happens when a shell script starts a background process and then exits.",[2025,2033,2035],{"id":2034},"why-does-the-container-restart-repeatedly","Why does the container restart repeatedly?",[14,2037,2038],{},"A restart policy is active and the main process keeps failing. Check container logs and the original exit code.",[2025,2040,2042],{"id":2041},"can-a-successful-image-build-still-fail-at-runtime","Can a successful image build still fail at runtime?",[14,2044,2045],{},"Yes. Build success only means the image was created. Runtime failures still happen from missing environment variables, incorrect commands, unavailable services, or bind mounts hiding files.",[2025,2047,2049],{"id":2048},"why-is-the-container-running-but-the-app-is-unreachable","Why is the container running but the app is unreachable?",[14,2051,2052,2053,2055],{},"The app may be listening on ",[33,2054,320],{},", using the wrong port, or the reverse proxy may be targeting the wrong upstream.",[2025,2057,2059],{"id":2058},"how-do-i-test-whether-gunicorn-can-import-my-app","How do I test whether gunicorn can import my app?",[14,2061,2062],{},"Run this inside the container:",[26,2064,2066],{"className":28,"code":2065,"language":30,"meta":31,"style":31},"python -c \"from wsgi import app; print(app)\"\n",[33,2067,2068],{"__ignoreMap":31},[36,2069,2070,2072,2074],{"class":38,"line":39},[36,2071,160],{"class":42},[36,2073,591],{"class":50},[36,2075,594],{"class":46},[14,2077,2078],{},"Or start gunicorn directly with the same command used in your Dockerfile or Compose file.",[2025,2080,2082],{"id":2081},"can-docker-compose-volumes-break-a-working-image","Can Docker Compose volumes break a working image?",[14,2084,2085],{},"Yes. A bind mount can overwrite the application directory and hide files copied during image build.",[2025,2087,2089,2090,2093],{"id":2088},"should-i-use-flask-run-in-production","Should I use ",[33,2091,2092],{},"flask run"," in production?",[14,2095,2096],{},"No. Use gunicorn or another production WSGI server.",[18,2098,2100],{"id":2099},"final-takeaway","Final Takeaway",[14,2102,2103,2104,974],{},"When a Flask Docker container does not start, treat it as a runtime process failure. Check logs, exit code, startup command, imports, environment variables, ports, mounts, and dependency readiness in that order. In most cases, the fix is a corrected gunicorn command, valid app import path, complete environment configuration, or a clean rebuild followed by validation against the production checklist at ",[970,2105,2019],{"href":2018},[2107,2108,2109],"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 .szBVR, html code.shiki .szBVR{--shiki-default:#D73A49;--shiki-dark:#F97583}html pre.shiki code .sVt8B, html code.shiki .sVt8B{--shiki-default:#24292E;--shiki-dark:#E1E4E8}html pre.shiki code .sJ8bj, html code.shiki .sJ8bj{--shiki-default:#6A737D;--shiki-dark:#6A737D}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);}html pre.shiki code .s9eBZ, html code.shiki .s9eBZ{--shiki-default:#22863A;--shiki-dark:#85E89D}",{"title":31,"searchDepth":54,"depth":54,"links":2111},[2112,2113,2114,2115,2116,2117,2118,2119,2129],{"id":20,"depth":54,"text":21},{"id":327,"depth":54,"text":328},{"id":334,"depth":54,"text":335},{"id":1536,"depth":54,"text":1537},{"id":1631,"depth":54,"text":1632},{"id":1923,"depth":54,"text":1924},{"id":2002,"depth":54,"text":2003},{"id":2022,"depth":54,"text":2023,"children":2120},[2121,2122,2123,2124,2125,2126,2127],{"id":2027,"depth":61,"text":2028},{"id":2034,"depth":61,"text":2035},{"id":2041,"depth":61,"text":2042},{"id":2048,"depth":61,"text":2049},{"id":2058,"depth":61,"text":2059},{"id":2081,"depth":61,"text":2082},{"id":2088,"depth":61,"text":2128},"Should I use flask run in production?",{"id":2099,"depth":54,"text":2100},"Complete guide on flask docker container not starting (fix guide) for Flask production environments.","md",{"ogTitle":5,"ogDescription":2130,"twitterCard":2133,"robots":2134,"canonical":2135},"summary_large_image","index, follow","https:\u002F\u002Fflask-deployment.com\u002Ffix-issues\u002Fflask-docker-container-not-starting-fix-guide","\u002Ffix-issues\u002Fflask-docker-container-not-starting-fix-guide",{"title":5,"description":2130},"fix-issues\u002Fflask-docker-container-not-starting-fix-guide","4yHjbaA1nMCmE8AQwSRRHL4EQ8vw2KC_VuGWcrodVWI",1776805766308]