import{s as In,ae as yl,af as Dn,f as s,a as o,g as a,D as p,c as i,h as Ye,d as t,j as u,k as T,i as n,l as zn,m as Rn}from"./scheduler.2f9f1739.js";import{S as An,i as On,b as Ie,d as ze,m as Re,a as Ae,t as Oe,e as Ee}from"./index.f9f1dac6.js";import{g as En,a as qn}from"./styles.a749dd55.js";import{M as Wn}from"./MarkdownLayout.50a9a114.js";import{L as Un}from"./link.4e908ad9.js";import{I as Qe}from"./image.a4587660.js";function Sn(H){let r;return{c(){r=zn("Install Docker Desktop | Docker Documentation")},l(f){r=Rn(f,"Install Docker Desktop | Docker Documentation")},m(f,d){n(f,r,d)},d(f){f&&t(r)}}}function Nn(H){let r,f="Containers keep rising in popularity and usage, and to be honest, It really solves a big problem which is why everyone keeps loving and adopting them.",d,y,c="One of the biggest problems in moving our apps from one environment to another has been solved with containers, what they basically are, just like the name suggest is that it a container where everything from our application dependencies to the operating system which our app will run on top off, has been put together in one piece.",m,h,hl="Basically, we can run this container in any environment and our app will be up running, and for dependencies of our applications, we carry them around, even if they were to be updated and the ones in our application become outdated, it will still work for us.",Ve,P,vl="The beauty of containers keeps increasing, as those that adopted it now have less to worry about, not totally true, but you get the point.",Xe,$,xl="<strong>Contents</strong>",Ze,M,Bl="<li><p>What is Docker</p></li> <li><p>Getting Docker</p></li> <li><p>Building our web app</p></li> <li><p>What is Dockerfile</p></li> <li><p>Dockerfile configuration</p></li> <li><p>Docker build</p></li>",et,g,Cl="Docker",tt,D,_l="Docker is an open-source platform that enables developers to build, deploy, run, update, and manage <em>containers</em>—standardized, executable components that combine application source code with the operating system (OS) libraries and dependencies required to run that code in any environment.",lt,q,bl="So to containerize an application, we need Docker, it is both a platform and a tool that we will be using.",nt,j,kl="Installing docker",st,I,wl="Of course, to use Docker, we need to have it installed on our machine, If you don’t already have it 🙂.",at,z,Fl="Click the link below to take you to the docker installation page.",ot,We,L,it,R,Tl="<p>Make sure to follow the instruction carefully in other to have docker properly setup and ready to go.</p>",pt,A,Hl="Dockerizing our Flask application",rt,O,Ll="The web app we will be building and containerizing will be built with Flask, It going to be very simple, really, it is just an Hello World web app.",ct,E,Pl="Or, if you are interested in something more challenging, you can follow my restful API tutorial, which is also built with Flask, and try to dockerize that. I think it will be fun.",ut,W,$l="Moving on, we will create our Hello World app and dockerize that.",ft,U,Ml="Hello World with Flask",dt,S,gl="Our project structure will look something like this:",mt,Ue,N,yt,K,Dl="app.py",ht,v,ql=`<code><span class="line"><span style="color: #F97583">from</span><span style="color: #B392F0"> flask </span><span style="color: #F97583">import</span><span style="color: #B392F0"> Flask</span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0">app </span><span style="color: #F97583">=</span><span style="color: #B392F0"> Flask</span><span style="color: #BBBBBB">(</span><span style="color: #79B8FF">__name__</span><span style="color: #BBBBBB">)</span></span> <span class="line"></span> <span class="line"><span style="color: #B392F0">@app</span><span style="color: #BBBBBB">.</span><span style="color: #B392F0">route</span><span style="color: #BBBBBB">(</span><span style="color: #FFAB70">'/'</span><span style="color: #BBBBBB">)</span></span> <span class="line"><span style="color: #F97583">def</span><span style="color: #B392F0"> index():</span></span> <span class="line"><span style="color: #B392F0"> </span><span style="color: #F97583">return</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">"Hello World"</span></span> <span class="line"></span> <span class="line"><span style="color: #F97583">if</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">__name__</span><span style="color: #B392F0"> </span><span style="color: #F97583">==</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'__main__'</span><span style="color: #BBBBBB">:</span></span> <span class="line"><span style="color: #B392F0"> app</span><span style="color: #BBBBBB">.</span><span style="color: #B392F0">run</span><span style="color: #BBBBBB">()</span></span></code>`,vt,J,jl="That’s it, for the most part of course. I think the code is pretty straightforward and doesn’t need an explanation.",xt,Y,Il="If you test this code, you should have a hello world in your browser.",Bt,Se,G,Ct,Q,zl="Greate, now that it is confirmed that our app is working properly, we can modify the code a little. Just a little, really.",_t,V,Rl="app.py",bt,x,Al=`<code><span class="line"><span style="color: #F97583">import</span><span style="color: #B392F0"> os</span></span> <span class="line"><span style="color: #B392F0">------</span></span> <span class="line"><span style="color: #B392F0">......</span></span> <span class="line"><span style="color: #B392F0">------</span></span> <span class="line"><span style="color: #F97583">if</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">__name__</span><span style="color: #B392F0"> </span><span style="color: #F97583">==</span><span style="color: #B392F0"> </span><span style="color: #FFAB70">'__main__'</span><span style="color: #BBBBBB">:</span></span> <span class="line"><span style="color: #B392F0"> port </span><span style="color: #F97583">=</span><span style="color: #B392F0"> </span><span style="color: #79B8FF">int</span><span style="color: #BBBBBB">(os.environ.</span><span style="color: #B392F0">get</span><span style="color: #BBBBBB">(</span><span style="color: #FFAB70">'PORT'</span><span style="color: #BBBBBB">, </span><span style="color: #F8F8F8">5000</span><span style="color: #BBBBBB">))</span></span> <span class="line"><span style="color: #B392F0"> app</span><span style="color: #BBBBBB">.</span><span style="color: #B392F0">run</span><span style="color: #BBBBBB">(host</span><span style="color: #F97583">=</span><span style="color: #FFAB70">'0.0.0.0'</span><span style="color: #BBBBBB">, port</span><span style="color: #F97583">=</span><span style="color: #BBBBBB">port)</span></span></code>`,kt,X,Ol="What I’ve done is modify the <code>app.run</code> to be able to run dynamically in our container.",wt,Z,El="By getting the port from an environmental variable that can be dynamic, our app can have a little more flexibility over the port it will be running on.",Ft,ee,Wl="For the host, it is set to <code>'0.0.0.0'</code>, which means the application will listen on all available network interfaces. This allows the application to be accessed from outside the container or server.",Tt,te,Ul="If we run our app again, it should work just fine without any problem.",Ht,le,Sl="requirements.txt",Lt,ne,Nl="For the dependencies of our app to be packaged together with docker, we need to of course fetch or install them during the build process of our container.",Pt,se,Kl="Just like every Python project, we will write the requirements of our application to a requirements.txt file.",$t,ae,Jl="<strong>requirements.txt</strong>",Mt,B,Yl='<code><span class="line"><span style="color: #b392f0">Flask</span></span></code>',gt,oe,Gl="of course, this is the only requirement of our application. If there are more of them, they are separated in a new line. You can also add specific versions of the packages to be installed.",Dt,ie,Ql="<strong>example</strong>",qt,C,Vl=`<code><span class="line"><span style="color: #b392f0">Flask==2.0.0</span></span> <span class="line"><span style="color: #b392f0">Jinja</span></span> <span class="line"><span style="color: #b392f0">Tailwindpie==0.1.1</span></span></code>`,jt,pe,Xl="All this can be easier if you are using a virtual environment. All you need to do is activate the environment and run.",It,_,Zl='<code><span class="line"><span style="color: #B392F0">pip </span><span style="color: #9DB1C5">freeze</span><span style="color: #B392F0"> </span><span style="color: #F97583">></span><span style="color: #B392F0"> </span><span style="color: #9DB1C5">requirements.txt</span></span></code>',zt,re,en="This command will fetch all pip packages you’ve installed and dump them in the file.",Rt,ce,tn="Dockerfile",At,ue,ln="Dockerfiles are text files that <strong>contain the instructions needed to build a Docker image</strong>. It might include instructions for installing certain libraries, copying source code and configuration files into the image, and setting environment variables.",Ot,fe,nn="You create this file without any extension i.e. .txt or anything or such. For our application we will have:",Et,de,sn="<strong>Dockerfile</strong>",Wt,b,an=`<code><span class="line"><span style="color: #6B737C"># Base image</span></span> <span class="line"><span style="color: #F97583">FROM</span><span style="color: #B392F0"> python:alpine</span></span> <span class="line"></span> <span class="line"><span style="color: #6B737C"># Creating work directory in docker</span></span> <span class="line"><span style="color: #F97583">WORKDIR</span><span style="color: #B392F0"> /usr/app</span></span> <span class="line"></span> <span class="line"><span style="color: #6B737C"># Copying files to docker</span></span> <span class="line"><span style="color: #F97583">ADD</span><span style="color: #B392F0"> . </span><span style="color: #FFAB70">'/usr/app'</span></span> <span class="line"></span> <span class="line"><span style="color: #6B737C">#RUN pip install flask</span></span> <span class="line"><span style="color: #F97583">RUN</span><span style="color: #B392F0"> pip install -r requirements.txt</span></span> <span class="line"></span> <span class="line"><span style="color: #6B737C"># Starting application</span></span> <span class="line"><span style="color: #F97583">CMD</span><span style="color: #B392F0"> [</span><span style="color: #FFAB70">"python"</span><span style="color: #B392F0">, </span><span style="color: #FFAB70">"app.py"</span><span style="color: #B392F0">]</span></span></code>`,Ut,me,on="Let’s go through each step to understand what’s happening:",St,ye,pn="<li><p><code>FROM python:alpine</code>: This line pulls the official Python image with the “alpine” version. Alpine is a smaller, lightweight variant of the base Python image based on the Alpine Linux distribution. This will be the operating system our app runs on.</p></li> <li><p><code>WORKDIR /usr/app</code>: This sets the working directory within the Docker image to “/usr/app”. Any subsequent commands will be executed from this directory.</p></li> <li><p><code>ADD . '/usr/app'</code>: This line copies all the files and directories from the current directory (where the Dockerfile resides i.e. our project directory) into the “/usr/app” directory in the Docker image.</p></li> <li><p><code>RUN pip install -r requirements.txt</code>: This command installs the Python packages listed in our “requirements.txt” file. It’s a common practice to keep project dependencies in a “requirements.txt” file, and this line ensures that our dependencies are fetched and installed inside the Docker image.</p></li> <li><p><code>CMD ["python", "app.py"]</code>: This is the default command to run when a container is started from this image. It specifies that the Python script “app.py” should be executed. This will run our script and will start our Flask server.</p></li>",Nt,he,rn="Build Image",Kt,ve,cn="Finally, we are in the build stage and all we have to do is:",Jt,xe,un="<li><p>Navigate to your project directory and open up the command prompt or terminal.</p></li> <li><p>If you are in vscode, all you need to do is open up the integrated terminal. You can use the shortcut <code>Crtl + Shift + `</code></p></li> <li><p>Run the <code>docker build</code> command.</p></li>",Yt,k,fn='<code><span class="line"><span style="color: #B392F0">docker </span><span style="color: #9DB1C5">build</span><span style="color: #B392F0"> </span><span style="color: #9DB1C5">-t</span><span style="color: #B392F0"> </span><span style="color: #9DB1C5">flask_hello_world</span><span style="color: #B392F0"> </span><span style="color: #9DB1C5">.</span></span></code>',Gt,Be,dn="Let me explain 🫠.",Qt,Ce,mn="<li><p><strong>-t</strong> tags the image with a name, in our case <code>flask_hello_world</code>.</p></li> <li><p><strong>.</strong> is telling docker to look for the Dockerfile in the current directory.</p></li>",Vt,_e,yn="<p>If you’re not in your project directory/folder, you can instead specify the path.</p>",Xt,Ne,be,Zt,ke,hn="After the build process is complete, you can verify that the image is created by running:",el,w,vn='<code><span class="line"><span style="color: #B392F0">docker </span><span style="color: #9DB1C5">images</span></span></code>',tl,Ke,we,ll,Fe,xn="There we can see our newly created <code>flask_hello_world</code> image.",nl,Te,Bn="Testing our Docker image",sl,He,Cn="Finally, we can test our image. Now that the image is built, it is available globally on your machine, i.e. you don’t have to be in your project directory to access the image.",al,Le,_n="To test our image, run:",ol,F,bn='<code><span class="line"><span style="color: #B392F0">docker </span><span style="color: #9DB1C5">run</span><span style="color: #B392F0"> </span><span style="color: #9DB1C5">-p</span><span style="color: #B392F0"> </span><span style="color: #F8F8F8">5000</span><span style="color: #9DB1C5">:5000</span><span style="color: #B392F0"> </span><span style="color: #9DB1C5">flask_hello_world</span></span></code>',il,Pe,kn="This command will of course run our container, but let me explain something before we move on.",pl,$e,wn="<li><strong>-p 5000:5000</strong> This command set the application in our container to listen to port <strong>5000</strong></li>",rl,Je,Me,cl,ge,Fn="Conclusion",ul,De,Tn="Finally, we have achieved what we set out to do, i.e. to build and containerize a Python web app.",fl,qe,Hn="By encapsulating applications and their dependencies, containers have definitely eliminated the <em>“it works on my machine”</em> dilemma 😮💨, streamlining the deployment process and ensuring consistency between development, testing, and production environments. This, in turn, has led to faster development cycles, reduced downtime, and improved collaboration among development and operations teams.",dl,je,Ln="<strong>Happy coding!</strong>",ml;return L=new Un({props:{href:"https://docs.docker.com/desktop",rel:"nofollow",$$slots:{default:[Sn]},$$scope:{ctx:H}}}),N=new Qe({props:{src:"https://cdn.hashnode.com/res/hashnode/image/upload/v1690010717652/d0960bea-3fe8-423c-9f13-a55916afe3d7.png"}}),G=new Qe({props:{src:"https://cdn.hashnode.com/res/hashnode/image/upload/v1689973074496/54be3901-fe2f-4654-8301-06b9ed7001cd.png",alt:"flask hello world app"}}),be=new Qe({props:{src:"https://cdn.hashnode.com/res/hashnode/image/upload/v1689973727561/849ec12f-b95b-42fa-97cb-af3d42888c5a.png"}}),we=new Qe({props:{src:"https://cdn.hashnode.com/res/hashnode/image/upload/v1689973458201/91240439-804b-4ca9-8697-a06f1723d1ea.png"}}),Me=new Qe({props:{src:"https://cdn.hashnode.com/res/hashnode/image/upload/v1689973166550/6c05c349-e429-4559-bb14-4bb47d4560e2.png"}}),{c(){r=s("p"),r.textContent=f,d=o(),y=s("p"),y.textContent=c,m=o(),h=s("p"),h.textContent=hl,Ve=o(),P=s("p"),P.textContent=vl,Xe=o(),$=s("p"),$.innerHTML=xl,Ze=o(),M=s("ol"),M.innerHTML=Bl,et=o(),g=s("h2"),g.textContent=Cl,tt=o(),D=s("p"),D.innerHTML=_l,lt=o(),q=s("p"),q.textContent=bl,nt=o(),j=s("h3"),j.textContent=kl,st=o(),I=s("p"),I.textContent=wl,at=o(),z=s("p"),z.textContent=Fl,ot=o(),We=s("p"),Ie(L.$$.fragment),it=o(),R=s("blockquote"),R.innerHTML=Tl,pt=o(),A=s("h3"),A.textContent=Hl,rt=o(),O=s("p"),O.textContent=Ll,ct=o(),E=s("p"),E.textContent=Pl,ut=o(),W=s("p"),W.textContent=$l,ft=o(),U=s("h3"),U.textContent=Ml,dt=o(),S=s("p"),S.textContent=gl,mt=o(),Ue=s("p"),Ie(N.$$.fragment),yt=o(),K=s("p"),K.textContent=Dl,ht=o(),v=s("pre"),v.innerHTML=ql,vt=o(),J=s("p"),J.textContent=jl,xt=o(),Y=s("p"),Y.textContent=Il,Bt=o(),Se=s("p"),Ie(G.$$.fragment),Ct=o(),Q=s("p"),Q.textContent=zl,_t=o(),V=s("p"),V.textContent=Rl,bt=o(),x=s("pre"),x.innerHTML=Al,kt=o(),X=s("p"),X.innerHTML=Ol,wt=o(),Z=s("p"),Z.textContent=El,Ft=o(),ee=s("p"),ee.innerHTML=Wl,Tt=o(),te=s("p"),te.textContent=Ul,Ht=o(),le=s("h3"),le.textContent=Sl,Lt=o(),ne=s("p"),ne.textContent=Nl,Pt=o(),se=s("p"),se.textContent=Kl,$t=o(),ae=s("p"),ae.innerHTML=Jl,Mt=o(),B=s("pre"),B.innerHTML=Yl,gt=o(),oe=s("p"),oe.textContent=Gl,Dt=o(),ie=s("p"),ie.innerHTML=Ql,qt=o(),C=s("pre"),C.innerHTML=Vl,jt=o(),pe=s("p"),pe.textContent=Xl,It=o(),_=s("pre"),_.innerHTML=Zl,zt=o(),re=s("p"),re.textContent=en,Rt=o(),ce=s("h3"),ce.textContent=tn,At=o(),ue=s("p"),ue.innerHTML=ln,Ot=o(),fe=s("p"),fe.textContent=nn,Et=o(),de=s("p"),de.innerHTML=sn,Wt=o(),b=s("pre"),b.innerHTML=an,Ut=o(),me=s("p"),me.textContent=on,St=o(),ye=s("ol"),ye.innerHTML=pn,Nt=o(),he=s("h3"),he.textContent=rn,Kt=o(),ve=s("p"),ve.textContent=cn,Jt=o(),xe=s("ol"),xe.innerHTML=un,Yt=o(),k=s("pre"),k.innerHTML=fn,Gt=o(),Be=s("p"),Be.textContent=dn,Qt=o(),Ce=s("ul"),Ce.innerHTML=mn,Vt=o(),_e=s("blockquote"),_e.innerHTML=yn,Xt=o(),Ne=s("p"),Ie(be.$$.fragment),Zt=o(),ke=s("p"),ke.textContent=hn,el=o(),w=s("pre"),w.innerHTML=vn,tl=o(),Ke=s("p"),Ie(we.$$.fragment),ll=o(),Fe=s("p"),Fe.innerHTML=xn,nl=o(),Te=s("h3"),Te.textContent=Bn,sl=o(),He=s("p"),He.textContent=Cn,al=o(),Le=s("p"),Le.textContent=_n,ol=o(),F=s("pre"),F.innerHTML=bn,il=o(),Pe=s("p"),Pe.textContent=kn,pl=o(),$e=s("ul"),$e.innerHTML=wn,rl=o(),Je=s("p"),Ie(Me.$$.fragment),cl=o(),ge=s("h4"),ge.textContent=Fn,ul=o(),De=s("p"),De.textContent=Tn,fl=o(),qe=s("p"),qe.innerHTML=Hn,dl=o(),je=s("p"),je.innerHTML=Ln,this.h()},l(e){r=a(e,"P",{"data-svelte-h":!0}),p(r)!=="svelte-1e7kxfj"&&(r.textContent=f),d=i(e),y=a(e,"P",{"data-svelte-h":!0}),p(y)!=="svelte-1s9imeg"&&(y.textContent=c),m=i(e),h=a(e,"P",{"data-svelte-h":!0}),p(h)!=="svelte-1dw97ah"&&(h.textContent=hl),Ve=i(e),P=a(e,"P",{"data-svelte-h":!0}),p(P)!=="svelte-n7a2ni"&&(P.textContent=vl),Xe=i(e),$=a(e,"P",{"data-svelte-h":!0}),p($)!=="svelte-w6lfvv"&&($.innerHTML=xl),Ze=i(e),M=a(e,"OL",{"data-svelte-h":!0}),p(M)!=="svelte-e2axab"&&(M.innerHTML=Bl),et=i(e),g=a(e,"H2",{"data-svelte-h":!0}),p(g)!=="svelte-1ee4ngu"&&(g.textContent=Cl),tt=i(e),D=a(e,"P",{"data-svelte-h":!0}),p(D)!=="svelte-fjef6"&&(D.innerHTML=_l),lt=i(e),q=a(e,"P",{"data-svelte-h":!0}),p(q)!=="svelte-1latr4j"&&(q.textContent=bl),nt=i(e),j=a(e,"H3",{"data-svelte-h":!0}),p(j)!=="svelte-qxz6jv"&&(j.textContent=kl),st=i(e),I=a(e,"P",{"data-svelte-h":!0}),p(I)!=="svelte-atkyu6"&&(I.textContent=wl),at=i(e),z=a(e,"P",{"data-svelte-h":!0}),p(z)!=="svelte-c83msw"&&(z.textContent=Fl),ot=i(e),We=a(e,"P",{});var l=Ye(We);ze(L.$$.fragment,l),l.forEach(t),it=i(e),R=a(e,"BLOCKQUOTE",{"data-svelte-h":!0}),p(R)!=="svelte-1mb6r9l"&&(R.innerHTML=Tl),pt=i(e),A=a(e,"H3",{"data-svelte-h":!0}),p(A)!=="svelte-4wj2ck"&&(A.textContent=Hl),rt=i(e),O=a(e,"P",{"data-svelte-h":!0}),p(O)!=="svelte-13j12ab"&&(O.textContent=Ll),ct=i(e),E=a(e,"P",{"data-svelte-h":!0}),p(E)!=="svelte-1aye498"&&(E.textContent=Pl),ut=i(e),W=a(e,"P",{"data-svelte-h":!0}),p(W)!=="svelte-21mps4"&&(W.textContent=$l),ft=i(e),U=a(e,"H3",{"data-svelte-h":!0}),p(U)!=="svelte-4ajy63"&&(U.textContent=Ml),dt=i(e),S=a(e,"P",{"data-svelte-h":!0}),p(S)!=="svelte-mm4ye6"&&(S.textContent=gl),mt=i(e),Ue=a(e,"P",{});var Ge=Ye(Ue);ze(N.$$.fragment,Ge),Ge.forEach(t),yt=i(e),K=a(e,"P",{"data-svelte-h":!0}),p(K)!=="svelte-1wem68g"&&(K.textContent=Dl),ht=i(e),v=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(v)!=="svelte-7frm9v"&&(v.innerHTML=ql),vt=i(e),J=a(e,"P",{"data-svelte-h":!0}),p(J)!=="svelte-emfmoh"&&(J.textContent=jl),xt=i(e),Y=a(e,"P",{"data-svelte-h":!0}),p(Y)!=="svelte-ffj5wg"&&(Y.textContent=Il),Bt=i(e),Se=a(e,"P",{});var Pn=Ye(Se);ze(G.$$.fragment,Pn),Pn.forEach(t),Ct=i(e),Q=a(e,"P",{"data-svelte-h":!0}),p(Q)!=="svelte-11enwi"&&(Q.textContent=zl),_t=i(e),V=a(e,"P",{"data-svelte-h":!0}),p(V)!=="svelte-1wem68g"&&(V.textContent=Rl),bt=i(e),x=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(x)!=="svelte-16qj75"&&(x.innerHTML=Al),kt=i(e),X=a(e,"P",{"data-svelte-h":!0}),p(X)!=="svelte-1o1i69o"&&(X.innerHTML=Ol),wt=i(e),Z=a(e,"P",{"data-svelte-h":!0}),p(Z)!=="svelte-1cjztsp"&&(Z.textContent=El),Ft=i(e),ee=a(e,"P",{"data-svelte-h":!0}),p(ee)!=="svelte-1s4lybw"&&(ee.innerHTML=Wl),Tt=i(e),te=a(e,"P",{"data-svelte-h":!0}),p(te)!=="svelte-pk7tkl"&&(te.textContent=Ul),Ht=i(e),le=a(e,"H3",{"data-svelte-h":!0}),p(le)!=="svelte-1h68cpy"&&(le.textContent=Sl),Lt=i(e),ne=a(e,"P",{"data-svelte-h":!0}),p(ne)!=="svelte-g8lal7"&&(ne.textContent=Nl),Pt=i(e),se=a(e,"P",{"data-svelte-h":!0}),p(se)!=="svelte-17jatlu"&&(se.textContent=Kl),$t=i(e),ae=a(e,"P",{"data-svelte-h":!0}),p(ae)!=="svelte-16lysqv"&&(ae.innerHTML=Jl),Mt=i(e),B=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(B)!=="svelte-1078tmx"&&(B.innerHTML=Yl),gt=i(e),oe=a(e,"P",{"data-svelte-h":!0}),p(oe)!=="svelte-1k4pph8"&&(oe.textContent=Gl),Dt=i(e),ie=a(e,"P",{"data-svelte-h":!0}),p(ie)!=="svelte-uzewsj"&&(ie.innerHTML=Ql),qt=i(e),C=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(C)!=="svelte-udu2cx"&&(C.innerHTML=Vl),jt=i(e),pe=a(e,"P",{"data-svelte-h":!0}),p(pe)!=="svelte-e5n4x9"&&(pe.textContent=Xl),It=i(e),_=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(_)!=="svelte-1eej619"&&(_.innerHTML=Zl),zt=i(e),re=a(e,"P",{"data-svelte-h":!0}),p(re)!=="svelte-1q1dxdq"&&(re.textContent=en),Rt=i(e),ce=a(e,"H3",{"data-svelte-h":!0}),p(ce)!=="svelte-1lehw42"&&(ce.textContent=tn),At=i(e),ue=a(e,"P",{"data-svelte-h":!0}),p(ue)!=="svelte-avwqy3"&&(ue.innerHTML=ln),Ot=i(e),fe=a(e,"P",{"data-svelte-h":!0}),p(fe)!=="svelte-11crsfg"&&(fe.textContent=nn),Et=i(e),de=a(e,"P",{"data-svelte-h":!0}),p(de)!=="svelte-1x5yz5n"&&(de.innerHTML=sn),Wt=i(e),b=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(b)!=="svelte-himsz7"&&(b.innerHTML=an),Ut=i(e),me=a(e,"P",{"data-svelte-h":!0}),p(me)!=="svelte-1o8fir4"&&(me.textContent=on),St=i(e),ye=a(e,"OL",{"data-svelte-h":!0}),p(ye)!=="svelte-1ul4tlq"&&(ye.innerHTML=pn),Nt=i(e),he=a(e,"H3",{"data-svelte-h":!0}),p(he)!=="svelte-187z0kd"&&(he.textContent=rn),Kt=i(e),ve=a(e,"P",{"data-svelte-h":!0}),p(ve)!=="svelte-9xkphr"&&(ve.textContent=cn),Jt=i(e),xe=a(e,"OL",{"data-svelte-h":!0}),p(xe)!=="svelte-vkymh7"&&(xe.innerHTML=un),Yt=i(e),k=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(k)!=="svelte-1f3sj11"&&(k.innerHTML=fn),Gt=i(e),Be=a(e,"P",{"data-svelte-h":!0}),p(Be)!=="svelte-l1exoi"&&(Be.textContent=dn),Qt=i(e),Ce=a(e,"UL",{"data-svelte-h":!0}),p(Ce)!=="svelte-1jmnvpa"&&(Ce.innerHTML=mn),Vt=i(e),_e=a(e,"BLOCKQUOTE",{"data-svelte-h":!0}),p(_e)!=="svelte-1lm2rg7"&&(_e.innerHTML=yn),Xt=i(e),Ne=a(e,"P",{});var $n=Ye(Ne);ze(be.$$.fragment,$n),$n.forEach(t),Zt=i(e),ke=a(e,"P",{"data-svelte-h":!0}),p(ke)!=="svelte-1hhbfw"&&(ke.textContent=hn),el=i(e),w=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(w)!=="svelte-11391pf"&&(w.innerHTML=vn),tl=i(e),Ke=a(e,"P",{});var Mn=Ye(Ke);ze(we.$$.fragment,Mn),Mn.forEach(t),ll=i(e),Fe=a(e,"P",{"data-svelte-h":!0}),p(Fe)!=="svelte-1wy0v5t"&&(Fe.innerHTML=xn),nl=i(e),Te=a(e,"H3",{"data-svelte-h":!0}),p(Te)!=="svelte-1wfk37v"&&(Te.textContent=Bn),sl=i(e),He=a(e,"P",{"data-svelte-h":!0}),p(He)!=="svelte-j1fzc2"&&(He.textContent=Cn),al=i(e),Le=a(e,"P",{"data-svelte-h":!0}),p(Le)!=="svelte-1bsp6nx"&&(Le.textContent=_n),ol=i(e),F=a(e,"PRE",{class:!0,style:!0,tabindex:!0,"data-svelte-h":!0}),p(F)!=="svelte-ml5cfj"&&(F.innerHTML=bn),il=i(e),Pe=a(e,"P",{"data-svelte-h":!0}),p(Pe)!=="svelte-5tnvez"&&(Pe.textContent=kn),pl=i(e),$e=a(e,"UL",{"data-svelte-h":!0}),p($e)!=="svelte-1gwxw0v"&&($e.innerHTML=wn),rl=i(e),Je=a(e,"P",{});var gn=Ye(Je);ze(Me.$$.fragment,gn),gn.forEach(t),cl=i(e),ge=a(e,"H4",{"data-svelte-h":!0}),p(ge)!=="svelte-9qkb21"&&(ge.textContent=Fn),ul=i(e),De=a(e,"P",{"data-svelte-h":!0}),p(De)!=="svelte-13q9a0z"&&(De.textContent=Tn),fl=i(e),qe=a(e,"P",{"data-svelte-h":!0}),p(qe)!=="svelte-th4wso"&&(qe.innerHTML=Hn),dl=i(e),je=a(e,"P",{"data-svelte-h":!0}),p(je)!=="svelte-1twzl2y"&&(je.innerHTML=Ln),this.h()},h(){u(v,"class","shiki min-dark"),T(v,"background-color","#1f1f1f"),u(v,"tabindex","0"),u(x,"class","shiki min-dark"),T(x,"background-color","#1f1f1f"),u(x,"tabindex","0"),u(B,"class","shiki min-dark"),T(B,"background-color","#1f1f1f"),u(B,"tabindex","0"),u(C,"class","shiki min-dark"),T(C,"background-color","#1f1f1f"),u(C,"tabindex","0"),u(_,"class","shiki min-dark"),T(_,"background-color","#1f1f1f"),u(_,"tabindex","0"),u(b,"class","shiki min-dark"),T(b,"background-color","#1f1f1f"),u(b,"tabindex","0"),u(k,"class","shiki min-dark"),T(k,"background-color","#1f1f1f"),u(k,"tabindex","0"),u(w,"class","shiki min-dark"),T(w,"background-color","#1f1f1f"),u(w,"tabindex","0"),u(F,"class","shiki min-dark"),T(F,"background-color","#1f1f1f"),u(F,"tabindex","0")},m(e,l){n(e,r,l),n(e,d,l),n(e,y,l),n(e,m,l),n(e,h,l),n(e,Ve,l),n(e,P,l),n(e,Xe,l),n(e,$,l),n(e,Ze,l),n(e,M,l),n(e,et,l),n(e,g,l),n(e,tt,l),n(e,D,l),n(e,lt,l),n(e,q,l),n(e,nt,l),n(e,j,l),n(e,st,l),n(e,I,l),n(e,at,l),n(e,z,l),n(e,ot,l),n(e,We,l),Re(L,We,null),n(e,it,l),n(e,R,l),n(e,pt,l),n(e,A,l),n(e,rt,l),n(e,O,l),n(e,ct,l),n(e,E,l),n(e,ut,l),n(e,W,l),n(e,ft,l),n(e,U,l),n(e,dt,l),n(e,S,l),n(e,mt,l),n(e,Ue,l),Re(N,Ue,null),n(e,yt,l),n(e,K,l),n(e,ht,l),n(e,v,l),n(e,vt,l),n(e,J,l),n(e,xt,l),n(e,Y,l),n(e,Bt,l),n(e,Se,l),Re(G,Se,null),n(e,Ct,l),n(e,Q,l),n(e,_t,l),n(e,V,l),n(e,bt,l),n(e,x,l),n(e,kt,l),n(e,X,l),n(e,wt,l),n(e,Z,l),n(e,Ft,l),n(e,ee,l),n(e,Tt,l),n(e,te,l),n(e,Ht,l),n(e,le,l),n(e,Lt,l),n(e,ne,l),n(e,Pt,l),n(e,se,l),n(e,$t,l),n(e,ae,l),n(e,Mt,l),n(e,B,l),n(e,gt,l),n(e,oe,l),n(e,Dt,l),n(e,ie,l),n(e,qt,l),n(e,C,l),n(e,jt,l),n(e,pe,l),n(e,It,l),n(e,_,l),n(e,zt,l),n(e,re,l),n(e,Rt,l),n(e,ce,l),n(e,At,l),n(e,ue,l),n(e,Ot,l),n(e,fe,l),n(e,Et,l),n(e,de,l),n(e,Wt,l),n(e,b,l),n(e,Ut,l),n(e,me,l),n(e,St,l),n(e,ye,l),n(e,Nt,l),n(e,he,l),n(e,Kt,l),n(e,ve,l),n(e,Jt,l),n(e,xe,l),n(e,Yt,l),n(e,k,l),n(e,Gt,l),n(e,Be,l),n(e,Qt,l),n(e,Ce,l),n(e,Vt,l),n(e,_e,l),n(e,Xt,l),n(e,Ne,l),Re(be,Ne,null),n(e,Zt,l),n(e,ke,l),n(e,el,l),n(e,w,l),n(e,tl,l),n(e,Ke,l),Re(we,Ke,null),n(e,ll,l),n(e,Fe,l),n(e,nl,l),n(e,Te,l),n(e,sl,l),n(e,He,l),n(e,al,l),n(e,Le,l),n(e,ol,l),n(e,F,l),n(e,il,l),n(e,Pe,l),n(e,pl,l),n(e,$e,l),n(e,rl,l),n(e,Je,l),Re(Me,Je,null),n(e,cl,l),n(e,ge,l),n(e,ul,l),n(e,De,l),n(e,fl,l),n(e,qe,l),n(e,dl,l),n(e,je,l),ml=!0},p(e,l){const Ge={};l&2&&(Ge.$$scope={dirty:l,ctx:e}),L.$set(Ge)},i(e){ml||(Ae(L.$$.fragment,e),Ae(N.$$.fragment,e),Ae(G.$$.fragment,e),Ae(be.$$.fragment,e),Ae(we.$$.fragment,e),Ae(Me.$$.fragment,e),ml=!0)},o(e){Oe(L.$$.fragment,e),Oe(N.$$.fragment,e),Oe(G.$$.fragment,e),Oe(be.$$.fragment,e),Oe(we.$$.fragment,e),Oe(Me.$$.fragment,e),ml=!1},d(e){e&&(t(r),t(d),t(y),t(m),t(h),t(Ve),t(P),t(Xe),t($),t(Ze),t(M),t(et),t(g),t(tt),t(D),t(lt),t(q),t(nt),t(j),t(st),t(I),t(at),t(z),t(ot),t(We),t(it),t(R),t(pt),t(A),t(rt),t(O),t(ct),t(E),t(ut),t(W),t(ft),t(U),t(dt),t(S),t(mt),t(Ue),t(yt),t(K),t(ht),t(v),t(vt),t(J),t(xt),t(Y),t(Bt),t(Se),t(Ct),t(Q),t(_t),t(V),t(bt),t(x),t(kt),t(X),t(wt),t(Z),t(Ft),t(ee),t(Tt),t(te),t(Ht),t(le),t(Lt),t(ne),t(Pt),t(se),t($t),t(ae),t(Mt),t(B),t(gt),t(oe),t(Dt),t(ie),t(qt),t(C),t(jt),t(pe),t(It),t(_),t(zt),t(re),t(Rt),t(ce),t(At),t(ue),t(Ot),t(fe),t(Et),t(de),t(Wt),t(b),t(Ut),t(me),t(St),t(ye),t(Nt),t(he),t(Kt),t(ve),t(Jt),t(xe),t(Yt),t(k),t(Gt),t(Be),t(Qt),t(Ce),t(Vt),t(_e),t(Xt),t(Ne),t(Zt),t(ke),t(el),t(w),t(tl),t(Ke),t(ll),t(Fe),t(nl),t(Te),t(sl),t(He),t(al),t(Le),t(ol),t(F),t(il),t(Pe),t(pl),t($e),t(rl),t(Je),t(cl),t(ge),t(ul),t(De),t(fl),t(qe),t(dl),t(je)),Ee(L),Ee(N),Ee(G),Ee(be),Ee(we),Ee(Me)}}}function Kn(H){let r,f;const d=[H[0],jn];let y={$$slots:{default:[Nn]},$$scope:{ctx:H}};for(let c=0;c<d.length;c+=1)y=yl(y,d[c]);return r=new Wn({props:y}),{c(){Ie(r.$$.fragment)},l(c){ze(r.$$.fragment,c)},m(c,m){Re(r,c,m),f=!0},p(c,[m]){const h=m&1?En(d,[m&1&&qn(c[0]),m&0&&qn(jn)]):{};m&2&&(h.$$scope={dirty:m,ctx:c}),r.$set(h)},i(c){f||(Ae(r.$$.fragment,c),f=!0)},o(c){Oe(r.$$.fragment,c),f=!1},d(c){Ee(r,c)}}}const jn={title:"How to Containerize a Python web app",description:`One of the biggest problems in moving our apps from one environment to another has been solved with containers, what they basically are, just like the name suggest is that it a container where everything from our application dependencies to the operating system which our app will run on top off, has been put together in one piece. `,date:"2023-07-29",lastmod:"2024-01-12",categories:["python","flask","docker"],published:!0};function Jn(H,r,f){return H.$$set=d=>{f(0,r=yl(yl({},r),Dn(d)))},r=Dn(r),[r]}class es extends An{constructor(r){super(),On(this,r,Jn,Kn,In,{})}}export{es as default,jn as metadata};