import{S as _o,i as go,s as jo,e as a,k as h,w as m,t as o,N as Jo,c as l,d as t,m as u,a as r,x as y,h as n,b as c,G as s,g as p,y as w,q as v,o as E,B as M,v as Ao}from"../chunks/vendor-hf-doc-builder.js";import{T as To}from"../chunks/Tip-hf-doc-builder.js";import{I as S}from"../chunks/IconCopyLink-hf-doc-builder.js";import{C as ce}from"../chunks/CodeBlock-hf-doc-builder.js";function Ro(Be){let $;return{c(){$=o("Always specify the `--chown=user` with `ADD` and `COPY` to ensure the new files are owned by your user.")},l(U){$=n(U,"Always specify the `--chown=user` with `ADD` and `COPY` to ensure the new files are owned by your user.")},m(U,b){p(U,$,b)},d(U){U&&t($)}}}function Io(Be){let $;return{c(){$=o("Updating metadata for a file creates a new copy stored in the new layer. Therefore, a recursive chown can result in a very large image due to the duplication of all affected files.")},l(U){$=n(U,"Updating metadata for a file creates a new copy stored in the new layer. Therefore, a recursive chown can result in a very large image due to the duplication of all affected files.")},m(U,b){p(U,$,b)},d(U){U&&t($)}}}function No(Be){let $,U,b,Y,tt,he,aa,st,la,zt,F,ra,ue,oa,na,qt,R,Q,at,fe,ia,lt,pa,Kt,f,ca,rt,ha,ua,de,fa,da,ot,ma,ya,nt,wa,va,it,Ea,Ma,pt,$a,Ua,ct,ka,ba,ht,Sa,Ta,ut,_a,ga,ft,ja,Ja,dt,Aa,Ra,es,me,ts,Ge,Ia,ss,Ce,Na,as,I,H,mt,ye,Da,yt,Va,ls,Pe,rs,N,O,wt,we,Ba,vt,Ga,os,D,Z,Et,ve,Ca,Mt,Pa,ns,T,Xa,$t,xa,Ya,Ee,Fa,Qa,is,Me,ps,V,W,Ut,$e,Ha,kt,Oa,cs,Xe,Za,hs,B,L,bt,Ue,Wa,St,La,us,G,z,Tt,ke,za,_t,qa,fs,q,Ka,xe,el,tl,ds,_,sl,gt,al,ll,jt,rl,ol,ms,Ye,nl,ys,be,ws,Se,vs,C,K,Jt,Te,il,At,pl,Es,g,cl,Rt,hl,ul,_e,fl,dl,Ms,P,ee,It,ge,ml,Nt,yl,$s,j,wl,Dt,vl,El,Vt,Ml,$l,Us,je,ks,te,bs,k,Ul,Bt,kl,bl,Gt,Sl,Tl,Ct,_l,gl,Pt,jl,Jl,Ss,Je,Ts,Fe,Al,_s,se,gs,ae,Rl,Xt,Il,Nl,js,Ae,Js,Qe,Dl,As,Re,Rs,le,Vl,xt,Bl,Gl,Is,X,re,Yt,Ie,Cl,Ft,Pl,Ns,oe,Xl,He,xl,Yl,Ds,J,Fl,Ne,Ql,Hl,ne,Qt,Ol,Zl,Wl,Vs,Oe,Ll,Bs,x,ie,Ht,De,zl,Ot,ql,Gs,pe,Zt,Ze,Kl,er,Wt,We,tr,Cs;return he=new S({}),fe=new S({}),me=new ce({props:{code:"LS0tJTBBdGl0bGUlM0ElMjBCYXNpYyUyMERvY2tlciUyMFNESyUyMFNwYWNlJTBBZW1vamklM0ElMjAlRjAlOUYlOTAlQjMlMEFjb2xvckZyb20lM0ElMjBwdXJwbGUlMEFjb2xvclRvJTNBJTIwZ3JheSUwQXNkayUzQSUyMGRvY2tlciUwQWFwcF9wb3J0JTNBJTIwNzg2MCUwQS0tLQ==",highlighted:`<span class="hljs-meta">---</span>
<span class="hljs-attr">title:</span> <span class="hljs-string">Basic</span> <span class="hljs-string">Docker</span> <span class="hljs-string">SDK</span> <span class="hljs-string">Space</span>
<span class="hljs-attr">emoji:</span> <span class="hljs-string">\u{1F433}</span>
<span class="hljs-attr">colorFrom:</span> <span class="hljs-string">purple</span>
<span class="hljs-attr">colorTo:</span> <span class="hljs-string">gray</span>
<span class="hljs-attr">sdk:</span> <span class="hljs-string">docker</span>
<span class="hljs-attr">app_port:</span> <span class="hljs-number">7860</span>
<span class="hljs-meta">---</span>`}}),ye=new S({}),we=new S({}),ve=new S({}),Me=new ce({props:{code:"JTA5JTIzJTIwRGVjbGFyZSUyMHlvdXIlMjBlbnZpcm9ubWVudCUyMHZhcmlhYmxlcyUyMHdpdGglMjB0aGUlMjBBUkclMjBkaXJlY3RpdmUlMEElMDlBUkclMjBNT0RFTF9SRVBPX05BTUUlMEElMEElMDlGUk9NJTIwcHl0aG9uJTNBbGF0ZXN0JTBBJTA5JTIzJTIwJTVCLi4uJTVEJTBBJTA5JTIzJTIwWW91JTIwY2FuJTIwdXNlJTIwdGhlbSUyMGxpa2UlMjBlbnZpcm9ubWVudCUyMHZhcmlhYmxlcyUwQSUwOVJVTiUyMHByZWRpY3QucHklMjAlMjRNT0RFTF9SRVBPX05BTUU=",highlighted:`	<span class="hljs-comment"># Declare your environment variables with the ARG directive</span>
	<span class="hljs-keyword">ARG</span> MODEL_REPO_NAME

	<span class="hljs-keyword">FROM</span> python:latest
	<span class="hljs-comment"># [...]</span>
	<span class="hljs-comment"># You can use them like environment variables</span>
	<span class="hljs-keyword">RUN</span><span class="language-bash"> predict.py <span class="hljs-variable">$MODEL_REPO_NAME</span></span>`}}),$e=new S({}),Ue=new S({}),ke=new S({}),be=new ce({props:{code:"JTIzJTIwRXhwb3NlJTIwdGhlJTIwc2VjcmV0JTIwU0VDUkVUX0VYQU1QTEUlMjBhdCUyMGJ1aWxkdGltZSUyMGFuZCUyMHVzZSUyMGl0cyUyMHZhbHVlJTIwYXMlMjBnaXQlMjByZW1vdGUlMjBVUkwlMEFSVU4lMjAtLW1vdW50JTNEdHlwZSUzRHNlY3JldCUyQ2lkJTNEU0VDUkVUX0VYQU1QTEUlMkNtb2RlJTNEMDQ0NCUyQ3JlcXVpcmVkJTNEdHJ1ZSUyMCU1QyUwQSUyMGdpdCUyMGluaXQlMjAlMjYlMjYlMjAlNUMlMEElMjBnaXQlMjByZW1vdGUlMjBhZGQlMjBvcmlnaW4lMjAlMjQoY2F0JTIwJTJGcnVuJTJGc2VjcmV0cyUyRlNFQ1JFVF9FWEFNUExFKQ==",highlighted:`<span class="hljs-comment"># Expose the secret SECRET_EXAMPLE at buildtime and use its value as git remote URL</span>
<span class="hljs-keyword">RUN</span><span class="language-bash"> --mount=<span class="hljs-built_in">type</span>=secret,<span class="hljs-built_in">id</span>=SECRET_EXAMPLE,mode=0444,required=<span class="hljs-literal">true</span> \\
 git init &amp;&amp; \\
 git remote add origin $(<span class="hljs-built_in">cat</span> /run/secrets/SECRET_EXAMPLE)</span>`}}),Se=new ce({props:{code:"JTIzJTIwRXhwb3NlJTIwdGhlJTIwc2VjcmV0JTIwU0VDUkVUX0VYQU1QTEUlMjBhdCUyMGJ1aWxkdGltZSUyMGFuZCUyMHVzZSUyMGl0cyUyMHZhbHVlJTIwYXMlMjBhJTIwQmVhcmVyJTIwdG9rZW4lMjBmb3IlMjBhJTIwY3VybCUyMHJlcXVlc3QlMEFSVU4lMjAtLW1vdW50JTNEdHlwZSUzRHNlY3JldCUyQ2lkJTNEU0VDUkVUX0VYQU1QTEUlMkNtb2RlJTNEMDQ0NCUyQ3JlcXVpcmVkJTNEdHJ1ZSUyMCU1QyUwQSUwOWN1cmwlMjB0ZXN0JTIwLUglMjAnQXV0aG9yaXphdGlvbiUzQSUyMEJlYXJlciUyMCUyNChjYXQlMjAlMkZydW4lMkZzZWNyZXRzJTJGU0VDUkVUX0VYQU1QTEUpJw==",highlighted:`<span class="hljs-comment"># Expose the secret SECRET_EXAMPLE at buildtime and use its value as a Bearer token for a curl request</span>
<span class="hljs-keyword">RUN</span><span class="language-bash"> --mount=<span class="hljs-built_in">type</span>=secret,<span class="hljs-built_in">id</span>=SECRET_EXAMPLE,mode=0444,required=<span class="hljs-literal">true</span> \\
	curl <span class="hljs-built_in">test</span> -H <span class="hljs-string">&#x27;Authorization: Bearer $(cat /run/secrets/SECRET_EXAMPLE)&#x27;</span></span>`}}),Te=new S({}),ge=new S({}),je=new ce({props:{code:"JTIzJTIwU2V0JTIwdXAlMjBhJTIwbmV3JTIwdXNlciUyMG5hbWVkJTIwJTIydXNlciUyMiUyMHdpdGglMjB1c2VyJTIwSUQlMjAxMDAwJTBBUlVOJTIwdXNlcmFkZCUyMC1tJTIwLXUlMjAxMDAwJTIwdXNlciUwQSUwQSUyMyUyMFN3aXRjaCUyMHRvJTIwdGhlJTIwJTIydXNlciUyMiUyMHVzZXIlMEFVU0VSJTIwdXNlciUwQSUwQSUyMyUyMFNldCUyMGhvbWUlMjB0byUyMHRoZSUyMHVzZXIncyUyMGhvbWUlMjBkaXJlY3RvcnklMEFFTlYlMjBIT01FJTNEJTJGaG9tZSUyRnVzZXIlMjAlNUMlMEElMDlQQVRIJTNEJTJGaG9tZSUyRnVzZXIlMkYubG9jYWwlMkZiaW4lM0ElMjRQQVRIJTBBJTBBJTIzJTIwU2V0JTIwdGhlJTIwd29ya2luZyUyMGRpcmVjdG9yeSUyMHRvJTIwdGhlJTIwdXNlcidzJTIwaG9tZSUyMGRpcmVjdG9yeSUwQVdPUktESVIlMjAlMjRIT01FJTJGYXBwJTBBJTBBJTIzJTIwVHJ5JTIwYW5kJTIwcnVuJTIwcGlwJTIwY29tbWFuZCUyMGFmdGVyJTIwc2V0dGluZyUyMHRoZSUyMHVzZXIlMjB3aXRoJTIwJTYwVVNFUiUyMHVzZXIlNjAlMjB0byUyMGF2b2lkJTIwcGVybWlzc2lvbiUyMGlzc3VlcyUyMHdpdGglMjBQeXRob24lMEFSVU4lMjBwaXAlMjBpbnN0YWxsJTIwLS1uby1jYWNoZS1kaXIlMjAtLXVwZ3JhZGUlMjBwaXAlMEElMEElMjMlMjBDb3B5JTIwdGhlJTIwY3VycmVudCUyMGRpcmVjdG9yeSUyMGNvbnRlbnRzJTIwaW50byUyMHRoZSUyMGNvbnRhaW5lciUyMGF0JTIwJTI0SE9NRSUyRmFwcCUyMHNldHRpbmclMjB0aGUlMjBvd25lciUyMHRvJTIwdGhlJTIwdXNlciUwQUNPUFklMjAtLWNob3duJTNEdXNlciUyMC4lMjAlMjRIT01FJTJGYXBwJTBBJTBBJTIzJTIwRG93bmxvYWQlMjBhJTIwY2hlY2twb2ludCUwQVJVTiUyMG1rZGlyJTIwY29udGVudCUwQUFERCUyMC0tY2hvd24lM0R1c2VyJTIwaHR0cHMlM0ElMkYlMkYlM0NTT01FX0FTU0VUX1VSTCUzRSUyMGNvbnRlbnQlMkYlM0NTT01FX0FTU0VUX05BTUUlM0U=",highlighted:`<span class="hljs-comment"># Set up a new user named &quot;user&quot; with user ID 1000</span>
<span class="hljs-keyword">RUN</span><span class="language-bash"> useradd -m -u 1000 user</span>

<span class="hljs-comment"># Switch to the &quot;user&quot; user</span>
<span class="hljs-keyword">USER</span> <span class="hljs-keyword">user</span>

<span class="hljs-comment"># Set home to the user&#x27;s home directory</span>
<span class="hljs-keyword">ENV</span> HOME=/home/<span class="hljs-keyword">user</span> \\
	PATH=/home/<span class="hljs-keyword">user</span>/.local/bin:$PATH

<span class="hljs-comment"># Set the working directory to the user&#x27;s home directory</span>
<span class="hljs-keyword">WORKDIR</span><span class="language-bash"> <span class="hljs-variable">$HOME</span>/app</span>

<span class="hljs-comment"># Try and run pip command after setting the user with \`USER user\` to avoid permission issues with Python</span>
<span class="hljs-keyword">RUN</span><span class="language-bash"> pip install --no-cache-dir --upgrade pip</span>

<span class="hljs-comment"># Copy the current directory contents into the container at $HOME/app setting the owner to the user</span>
<span class="hljs-keyword">COPY</span><span class="language-bash"> --<span class="hljs-built_in">chown</span>=user . <span class="hljs-variable">$HOME</span>/app</span>

<span class="hljs-comment"># Download a checkpoint</span>
<span class="hljs-keyword">RUN</span><span class="language-bash"> <span class="hljs-built_in">mkdir</span> content</span>
<span class="hljs-keyword">ADD</span><span class="language-bash"> --<span class="hljs-built_in">chown</span>=user https://&lt;SOME_ASSET_URL&gt; content/&lt;SOME_ASSET_NAME&gt;</span>`}}),te=new To({props:{warning:!0,$$slots:{default:[Ro]},$$scope:{ctx:Be}}}),Je=new ce({props:{code:"UlVOJTIwbWtkaXIlMjAtcCUyMCUyRmRhdGElMEFSVU4lMjBjaG1vZCUyMDc3NyUyMCUyRmRhdGE=",highlighted:`<span class="hljs-keyword">RUN</span><span class="language-bash"> <span class="hljs-built_in">mkdir</span> -p /data</span>
<span class="hljs-keyword">RUN</span><span class="language-bash"> <span class="hljs-built_in">chmod</span> 777 /data</span>`}}),se=new To({props:{warning:!0,$$slots:{default:[Io]},$$scope:{ctx:Be}}}),Ae=new ce({props:{code:"Q09QWSUyMGNoZWNrcG9pbnQlMjAuJTBBUlVOJTIwY2hvd24lMjAtUiUyMHVzZXIlMjBjaGVja3BvaW50",highlighted:`<span class="hljs-keyword">COPY</span> <span class="hljs-keyword">checkpoint</span> .
RUN chown -R <span class="hljs-keyword">user</span> <span class="hljs-keyword">checkpoint</span>`}}),Re=new ce({props:{code:"Q09QWSUyMC0tY2hvd24lM0R1c2VyJTIwY2hlY2twb2ludCUyMC4=",highlighted:'COPY --<span class="hljs-attr">chown=</span><span class="hljs-keyword">user</span> <span class="hljs-title">checkpoint</span> .'}}),Ie=new S({}),De=new S({}),{c(){$=a("meta"),U=h(),b=a("h1"),Y=a("a"),tt=a("span"),m(he.$$.fragment),aa=h(),st=a("span"),la=o("Docker Spaces"),zt=h(),F=a("p"),ra=o("Spaces accommodate custom "),ue=a("a"),oa=o("Docker containers"),na=o(" for apps outside the scope of Streamlit and Gradio. Docker Spaces allow users to go beyond the limits of what was previously possible with the standard SDKs. From FastAPI and Go endpoints to Phoenix apps and ML Ops tools, Docker Spaces can help in many different setups."),qt=h(),R=a("h2"),Q=a("a"),at=a("span"),m(fe.$$.fragment),ia=h(),lt=a("span"),pa=o("Setting up Docker Spaces"),Kt=h(),f=a("p"),ca=o("Selecting "),rt=a("strong"),ha=o("Docker"),ua=o(" as the SDK when "),de=a("a"),fa=o("creating a new Space"),da=o(" will initialize your Space by setting the "),ot=a("code"),ma=o("sdk"),ya=o(" property to "),nt=a("code"),wa=o("docker"),va=o(" in your "),it=a("code"),Ea=o("README.md"),Ma=o(" file\u2019s YAML block. Alternatively, given an existing Space repository, set "),pt=a("code"),$a=o("sdk: docker"),Ua=o(" inside the "),ct=a("code"),ka=o("YAML"),ba=o(" block at the top of your Spaces "),ht=a("strong"),Sa=o("README.md"),Ta=o(" file. You can also change the default exposed port "),ut=a("code"),_a=o("7860"),ga=o(" by setting "),ft=a("code"),ja=o("app_port: 7860"),Ja=o(". Afterwards, you can create a usual "),dt=a("code"),Aa=o("Dockerfile"),Ra=o("."),es=h(),m(me.$$.fragment),ts=h(),Ge=a("p"),Ia=o("Internally you could have as many open ports as you want. For instance, you can install Elasticsearch inside your Space and call it internally on its default port 9200."),ss=h(),Ce=a("p"),Na=o("If you want to expose apps served on multiple ports to the outside world, a workaround is to use a reverse proxy like Nginx to dispatch requests from the broader internet (on a single port) to different internal ports."),as=h(),I=a("h2"),H=a("a"),mt=a("span"),m(ye.$$.fragment),Da=h(),yt=a("span"),Va=o("Secrets and Variables Management"),ls=h(),Pe=a("a"),rs=o(`
You can manage a Space's environment variables in the Space Settings. Read more [here](./spaces-overview.md#managing-the-environment).
`),N=a("h3"),O=a("a"),wt=a("span"),m(we.$$.fragment),Ba=h(),vt=a("span"),Ga=o("Variables"),os=h(),D=a("h4"),Z=a("a"),Et=a("span"),m(ve.$$.fragment),Ca=h(),Mt=a("span"),Pa=o("Buildtime"),ns=h(),T=a("p"),Xa=o("Variables are passed as "),$t=a("code"),xa=o("build-arg"),Ya=o("s when building your Docker Space. Read "),Ee=a("a"),Fa=o("Docker\u2019s dedicated documentation"),Qa=o(" for a complete guide on how to use this in the Dockerfile."),is=h(),m(Me.$$.fragment),ps=h(),V=a("h4"),W=a("a"),Ut=a("span"),m($e.$$.fragment),Ha=h(),kt=a("span"),Oa=o("Runtime"),cs=h(),Xe=a("p"),Za=o("Variables are injected in the container\u2019s environment at runtime."),hs=h(),B=a("h3"),L=a("a"),bt=a("span"),m(Ue.$$.fragment),Wa=h(),St=a("span"),La=o("Secrets"),us=h(),G=a("h4"),z=a("a"),Tt=a("span"),m(ke.$$.fragment),za=h(),_t=a("span"),qa=o("Buildtime"),fs=h(),q=a("p"),Ka=o("In Docker Spaces, the secrets management is different for security reasons. Once you create a secret in the "),xe=a("a"),el=o("Settings tab"),tl=o(", you can expose the secret by adding the following line in your Dockerfile:"),ds=h(),_=a("p"),sl=o("For example, if "),gt=a("code"),al=o("SECRET_EXAMPLE"),ll=o(" is the name of the secret you created in the Settings tab, you can read it at build time by mounting it to a file, then reading it with "),jt=a("code"),rl=o("$(cat /run/secrets/SECRET_EXAMPLE)"),ol=o("."),ms=h(),Ye=a("p"),nl=o("See an example below:"),ys=h(),m(be.$$.fragment),ws=h(),m(Se.$$.fragment),vs=h(),C=a("h4"),K=a("a"),Jt=a("span"),m(Te.$$.fragment),il=h(),At=a("span"),pl=o("Runtime"),Es=h(),g=a("p"),cl=o("Same as for public Variables, at runtime, you can access the secrets as environment variables. For example, in Python you would use "),Rt=a("code"),hl=o('os.environ.get("SECRET_EXAMPLE")'),ul=o(". Check out this "),_e=a("a"),fl=o("example"),dl=o(" of a Docker Space that uses secrets."),Ms=h(),P=a("h2"),ee=a("a"),It=a("span"),m(ge.$$.fragment),ml=h(),Nt=a("span"),yl=o("Permissions"),$s=h(),j=a("p"),wl=o("The container runs with user ID 1000. To avoid permission issues you should create a user and set its "),Dt=a("code"),vl=o("WORKDIR"),El=o(" before any "),Vt=a("code"),Ml=o("COPY"),$l=o(" or download."),Us=h(),m(je.$$.fragment),ks=h(),m(te.$$.fragment),bs=h(),k=a("p"),Ul=o("If you still face permission issues, you might need to use "),Bt=a("code"),kl=o("chmod"),bl=o(" or "),Gt=a("code"),Sl=o("chown"),Tl=o(" in your "),Ct=a("code"),_l=o("Dockerfile"),gl=o(" to grant the right permissions. For example, if you want to use the directory "),Pt=a("code"),jl=o("/data"),Jl=o(", you can do:"),Ss=h(),m(Je.$$.fragment),Ts=h(),Fe=a("p"),Al=o("You should always avoid superfluous chowns."),_s=h(),m(se.$$.fragment),gs=h(),ae=a("p"),Rl=o("Rather than fixing permission by running "),Xt=a("code"),Il=o("chown"),Nl=o(":"),js=h(),m(Ae.$$.fragment),Js=h(),Qe=a("p"),Dl=o("you should always do:"),As=h(),m(Re.$$.fragment),Rs=h(),le=a("p"),Vl=o("(same goes for "),xt=a("code"),Bl=o("ADD"),Gl=o(" command)"),Is=h(),X=a("h2"),re=a("a"),Yt=a("span"),m(Ie.$$.fragment),Cl=h(),Ft=a("span"),Pl=o("Data Persistence"),Ns=h(),oe=a("p"),Xl=o("The data written on disk is lost whenever your Docker Space restarts, unless you opt-in for a "),He=a("a"),xl=o("persistent storage"),Yl=o(" upgrade."),Ds=h(),J=a("p"),Fl=o("You can also use our Datasets Hub for specific cases, where you can store state and data in a git LFS repository. You can find an example of persistence "),Ne=a("a"),Ql=o("here"),Hl=o(", which uses the "),ne=a("a"),Qt=a("code"),Ol=o("huggingface_hub"),Zl=o(" library"),Wl=o(" for programmatically uploading files to a dataset repository."),Vs=h(),Oe=a("p"),Ll=o("Finally, in some cases, you might want to use an external storage solution from your Space\u2019s code like an external hosted DB, S3, etc."),Bs=h(),x=a("h2"),ie=a("a"),Ht=a("span"),m(De.$$.fragment),zl=h(),Ot=a("span"),ql=o("Read More"),Gs=h(),pe=a("ul"),Zt=a("li"),Ze=a("a"),Kl=o("Full Docker demo example"),er=h(),Wt=a("li"),We=a("a"),tr=o("List of Docker Spaces examples"),this.h()},l(e){const i=Jo('[data-svelte="svelte-1phssyn"]',document.head);$=l(i,"META",{name:!0,content:!0}),i.forEach(t),U=u(e),b=l(e,"H1",{class:!0});var Ve=r(b);Y=l(Ve,"A",{id:!0,class:!0,href:!0});var Lt=r(Y);tt=l(Lt,"SPAN",{});var ar=r(tt);y(he.$$.fragment,ar),ar.forEach(t),Lt.forEach(t),aa=u(Ve),st=l(Ve,"SPAN",{});var lr=r(st);la=n(lr,"Docker Spaces"),lr.forEach(t),Ve.forEach(t),zt=u(e),F=l(e,"P",{});var Ps=r(F);ra=n(Ps,"Spaces accommodate custom "),ue=l(Ps,"A",{href:!0,rel:!0});var rr=r(ue);oa=n(rr,"Docker containers"),rr.forEach(t),na=n(Ps," for apps outside the scope of Streamlit and Gradio. Docker Spaces allow users to go beyond the limits of what was previously possible with the standard SDKs. From FastAPI and Go endpoints to Phoenix apps and ML Ops tools, Docker Spaces can help in many different setups."),Ps.forEach(t),qt=u(e),R=l(e,"H2",{class:!0});var Xs=r(R);Q=l(Xs,"A",{id:!0,class:!0,href:!0});var or=r(Q);at=l(or,"SPAN",{});var nr=r(at);y(fe.$$.fragment,nr),nr.forEach(t),or.forEach(t),ia=u(Xs),lt=l(Xs,"SPAN",{});var ir=r(lt);pa=n(ir,"Setting up Docker Spaces"),ir.forEach(t),Xs.forEach(t),Kt=u(e),f=l(e,"P",{});var d=r(f);ca=n(d,"Selecting "),rt=l(d,"STRONG",{});var pr=r(rt);ha=n(pr,"Docker"),pr.forEach(t),ua=n(d," as the SDK when "),de=l(d,"A",{href:!0,rel:!0});var cr=r(de);fa=n(cr,"creating a new Space"),cr.forEach(t),da=n(d," will initialize your Space by setting the "),ot=l(d,"CODE",{});var hr=r(ot);ma=n(hr,"sdk"),hr.forEach(t),ya=n(d," property to "),nt=l(d,"CODE",{});var ur=r(nt);wa=n(ur,"docker"),ur.forEach(t),va=n(d," in your "),it=l(d,"CODE",{});var fr=r(it);Ea=n(fr,"README.md"),fr.forEach(t),Ma=n(d," file\u2019s YAML block. Alternatively, given an existing Space repository, set "),pt=l(d,"CODE",{});var dr=r(pt);$a=n(dr,"sdk: docker"),dr.forEach(t),Ua=n(d," inside the "),ct=l(d,"CODE",{});var mr=r(ct);ka=n(mr,"YAML"),mr.forEach(t),ba=n(d," block at the top of your Spaces "),ht=l(d,"STRONG",{});var yr=r(ht);Sa=n(yr,"README.md"),yr.forEach(t),Ta=n(d," file. You can also change the default exposed port "),ut=l(d,"CODE",{});var wr=r(ut);_a=n(wr,"7860"),wr.forEach(t),ga=n(d," by setting "),ft=l(d,"CODE",{});var vr=r(ft);ja=n(vr,"app_port: 7860"),vr.forEach(t),Ja=n(d,". Afterwards, you can create a usual "),dt=l(d,"CODE",{});var Er=r(dt);Aa=n(Er,"Dockerfile"),Er.forEach(t),Ra=n(d,"."),d.forEach(t),es=u(e),y(me.$$.fragment,e),ts=u(e),Ge=l(e,"P",{});var Mr=r(Ge);Ia=n(Mr,"Internally you could have as many open ports as you want. For instance, you can install Elasticsearch inside your Space and call it internally on its default port 9200."),Mr.forEach(t),ss=u(e),Ce=l(e,"P",{});var $r=r(Ce);Na=n($r,"If you want to expose apps served on multiple ports to the outside world, a workaround is to use a reverse proxy like Nginx to dispatch requests from the broader internet (on a single port) to different internal ports."),$r.forEach(t),as=u(e),I=l(e,"H2",{class:!0});var xs=r(I);H=l(xs,"A",{id:!0,class:!0,href:!0});var Ur=r(H);mt=l(Ur,"SPAN",{});var kr=r(mt);y(ye.$$.fragment,kr),kr.forEach(t),Ur.forEach(t),Da=u(xs),yt=l(xs,"SPAN",{});var br=r(yt);Va=n(br,"Secrets and Variables Management"),br.forEach(t),xs.forEach(t),ls=u(e),Pe=l(e,"A",{id:!0}),r(Pe).forEach(t),rs=n(e,`
You can manage a Space's environment variables in the Space Settings. Read more [here](./spaces-overview.md#managing-the-environment).
`),N=l(e,"H3",{class:!0});var Ys=r(N);O=l(Ys,"A",{id:!0,class:!0,href:!0});var Sr=r(O);wt=l(Sr,"SPAN",{});var Tr=r(wt);y(we.$$.fragment,Tr),Tr.forEach(t),Sr.forEach(t),Ba=u(Ys),vt=l(Ys,"SPAN",{});var _r=r(vt);Ga=n(_r,"Variables"),_r.forEach(t),Ys.forEach(t),os=u(e),D=l(e,"H4",{class:!0});var Fs=r(D);Z=l(Fs,"A",{id:!0,class:!0,href:!0});var gr=r(Z);Et=l(gr,"SPAN",{});var jr=r(Et);y(ve.$$.fragment,jr),jr.forEach(t),gr.forEach(t),Ca=u(Fs),Mt=l(Fs,"SPAN",{});var Jr=r(Mt);Pa=n(Jr,"Buildtime"),Jr.forEach(t),Fs.forEach(t),ns=u(e),T=l(e,"P",{});var Le=r(T);Xa=n(Le,"Variables are passed as "),$t=l(Le,"CODE",{});var Ar=r($t);xa=n(Ar,"build-arg"),Ar.forEach(t),Ya=n(Le,"s when building your Docker Space. Read "),Ee=l(Le,"A",{href:!0,rel:!0});var Rr=r(Ee);Fa=n(Rr,"Docker\u2019s dedicated documentation"),Rr.forEach(t),Qa=n(Le," for a complete guide on how to use this in the Dockerfile."),Le.forEach(t),is=u(e),y(Me.$$.fragment,e),ps=u(e),V=l(e,"H4",{class:!0});var Qs=r(V);W=l(Qs,"A",{id:!0,class:!0,href:!0});var Ir=r(W);Ut=l(Ir,"SPAN",{});var Nr=r(Ut);y($e.$$.fragment,Nr),Nr.forEach(t),Ir.forEach(t),Ha=u(Qs),kt=l(Qs,"SPAN",{});var Dr=r(kt);Oa=n(Dr,"Runtime"),Dr.forEach(t),Qs.forEach(t),cs=u(e),Xe=l(e,"P",{});var Vr=r(Xe);Za=n(Vr,"Variables are injected in the container\u2019s environment at runtime."),Vr.forEach(t),hs=u(e),B=l(e,"H3",{class:!0});var Hs=r(B);L=l(Hs,"A",{id:!0,class:!0,href:!0});var Br=r(L);bt=l(Br,"SPAN",{});var Gr=r(bt);y(Ue.$$.fragment,Gr),Gr.forEach(t),Br.forEach(t),Wa=u(Hs),St=l(Hs,"SPAN",{});var Cr=r(St);La=n(Cr,"Secrets"),Cr.forEach(t),Hs.forEach(t),us=u(e),G=l(e,"H4",{class:!0});var Os=r(G);z=l(Os,"A",{id:!0,class:!0,href:!0});var Pr=r(z);Tt=l(Pr,"SPAN",{});var Xr=r(Tt);y(ke.$$.fragment,Xr),Xr.forEach(t),Pr.forEach(t),za=u(Os),_t=l(Os,"SPAN",{});var xr=r(_t);qa=n(xr,"Buildtime"),xr.forEach(t),Os.forEach(t),fs=u(e),q=l(e,"P",{});var Zs=r(q);Ka=n(Zs,"In Docker Spaces, the secrets management is different for security reasons. Once you create a secret in the "),xe=l(Zs,"A",{href:!0});var Yr=r(xe);el=n(Yr,"Settings tab"),Yr.forEach(t),tl=n(Zs,", you can expose the secret by adding the following line in your Dockerfile:"),Zs.forEach(t),ds=u(e),_=l(e,"P",{});var ze=r(_);sl=n(ze,"For example, if "),gt=l(ze,"CODE",{});var Fr=r(gt);al=n(Fr,"SECRET_EXAMPLE"),Fr.forEach(t),ll=n(ze," is the name of the secret you created in the Settings tab, you can read it at build time by mounting it to a file, then reading it with "),jt=l(ze,"CODE",{});var Qr=r(jt);rl=n(Qr,"$(cat /run/secrets/SECRET_EXAMPLE)"),Qr.forEach(t),ol=n(ze,"."),ze.forEach(t),ms=u(e),Ye=l(e,"P",{});var Hr=r(Ye);nl=n(Hr,"See an example below:"),Hr.forEach(t),ys=u(e),y(be.$$.fragment,e),ws=u(e),y(Se.$$.fragment,e),vs=u(e),C=l(e,"H4",{class:!0});var Ws=r(C);K=l(Ws,"A",{id:!0,class:!0,href:!0});var Or=r(K);Jt=l(Or,"SPAN",{});var Zr=r(Jt);y(Te.$$.fragment,Zr),Zr.forEach(t),Or.forEach(t),il=u(Ws),At=l(Ws,"SPAN",{});var Wr=r(At);pl=n(Wr,"Runtime"),Wr.forEach(t),Ws.forEach(t),Es=u(e),g=l(e,"P",{});var qe=r(g);cl=n(qe,"Same as for public Variables, at runtime, you can access the secrets as environment variables. For example, in Python you would use "),Rt=l(qe,"CODE",{});var Lr=r(Rt);hl=n(Lr,'os.environ.get("SECRET_EXAMPLE")'),Lr.forEach(t),ul=n(qe,". Check out this "),_e=l(qe,"A",{href:!0,rel:!0});var zr=r(_e);fl=n(zr,"example"),zr.forEach(t),dl=n(qe," of a Docker Space that uses secrets."),qe.forEach(t),Ms=u(e),P=l(e,"H2",{class:!0});var Ls=r(P);ee=l(Ls,"A",{id:!0,class:!0,href:!0});var qr=r(ee);It=l(qr,"SPAN",{});var Kr=r(It);y(ge.$$.fragment,Kr),Kr.forEach(t),qr.forEach(t),ml=u(Ls),Nt=l(Ls,"SPAN",{});var eo=r(Nt);yl=n(eo,"Permissions"),eo.forEach(t),Ls.forEach(t),$s=u(e),j=l(e,"P",{});var Ke=r(j);wl=n(Ke,"The container runs with user ID 1000. To avoid permission issues you should create a user and set its "),Dt=l(Ke,"CODE",{});var to=r(Dt);vl=n(to,"WORKDIR"),to.forEach(t),El=n(Ke," before any "),Vt=l(Ke,"CODE",{});var so=r(Vt);Ml=n(so,"COPY"),so.forEach(t),$l=n(Ke," or download."),Ke.forEach(t),Us=u(e),y(je.$$.fragment,e),ks=u(e),y(te.$$.fragment,e),bs=u(e),k=l(e,"P",{});var A=r(k);Ul=n(A,"If you still face permission issues, you might need to use "),Bt=l(A,"CODE",{});var ao=r(Bt);kl=n(ao,"chmod"),ao.forEach(t),bl=n(A," or "),Gt=l(A,"CODE",{});var lo=r(Gt);Sl=n(lo,"chown"),lo.forEach(t),Tl=n(A," in your "),Ct=l(A,"CODE",{});var ro=r(Ct);_l=n(ro,"Dockerfile"),ro.forEach(t),gl=n(A," to grant the right permissions. For example, if you want to use the directory "),Pt=l(A,"CODE",{});var oo=r(Pt);jl=n(oo,"/data"),oo.forEach(t),Jl=n(A,", you can do:"),A.forEach(t),Ss=u(e),y(Je.$$.fragment,e),Ts=u(e),Fe=l(e,"P",{});var no=r(Fe);Al=n(no,"You should always avoid superfluous chowns."),no.forEach(t),_s=u(e),y(se.$$.fragment,e),gs=u(e),ae=l(e,"P",{});var zs=r(ae);Rl=n(zs,"Rather than fixing permission by running "),Xt=l(zs,"CODE",{});var io=r(Xt);Il=n(io,"chown"),io.forEach(t),Nl=n(zs,":"),zs.forEach(t),js=u(e),y(Ae.$$.fragment,e),Js=u(e),Qe=l(e,"P",{});var po=r(Qe);Dl=n(po,"you should always do:"),po.forEach(t),As=u(e),y(Re.$$.fragment,e),Rs=u(e),le=l(e,"P",{});var qs=r(le);Vl=n(qs,"(same goes for "),xt=l(qs,"CODE",{});var co=r(xt);Bl=n(co,"ADD"),co.forEach(t),Gl=n(qs," command)"),qs.forEach(t),Is=u(e),X=l(e,"H2",{class:!0});var Ks=r(X);re=l(Ks,"A",{id:!0,class:!0,href:!0});var ho=r(re);Yt=l(ho,"SPAN",{});var uo=r(Yt);y(Ie.$$.fragment,uo),uo.forEach(t),ho.forEach(t),Cl=u(Ks),Ft=l(Ks,"SPAN",{});var fo=r(Ft);Pl=n(fo,"Data Persistence"),fo.forEach(t),Ks.forEach(t),Ns=u(e),oe=l(e,"P",{});var ea=r(oe);Xl=n(ea,"The data written on disk is lost whenever your Docker Space restarts, unless you opt-in for a "),He=l(ea,"A",{href:!0});var mo=r(He);xl=n(mo,"persistent storage"),mo.forEach(t),Yl=n(ea," upgrade."),ea.forEach(t),Ds=u(e),J=l(e,"P",{});var et=r(J);Fl=n(et,"You can also use our Datasets Hub for specific cases, where you can store state and data in a git LFS repository. You can find an example of persistence "),Ne=l(et,"A",{href:!0,rel:!0});var yo=r(Ne);Ql=n(yo,"here"),yo.forEach(t),Hl=n(et,", which uses the "),ne=l(et,"A",{href:!0,rel:!0});var sr=r(ne);Qt=l(sr,"CODE",{});var wo=r(Qt);Ol=n(wo,"huggingface_hub"),wo.forEach(t),Zl=n(sr," library"),sr.forEach(t),Wl=n(et," for programmatically uploading files to a dataset repository."),et.forEach(t),Vs=u(e),Oe=l(e,"P",{});var vo=r(Oe);Ll=n(vo,"Finally, in some cases, you might want to use an external storage solution from your Space\u2019s code like an external hosted DB, S3, etc."),vo.forEach(t),Bs=u(e),x=l(e,"H2",{class:!0});var ta=r(x);ie=l(ta,"A",{id:!0,class:!0,href:!0});var Eo=r(ie);Ht=l(Eo,"SPAN",{});var Mo=r(Ht);y(De.$$.fragment,Mo),Mo.forEach(t),Eo.forEach(t),zl=u(ta),Ot=l(ta,"SPAN",{});var $o=r(Ot);ql=n($o,"Read More"),$o.forEach(t),ta.forEach(t),Gs=u(e),pe=l(e,"UL",{});var sa=r(pe);Zt=l(sa,"LI",{});var Uo=r(Zt);Ze=l(Uo,"A",{href:!0});var ko=r(Ze);Kl=n(ko,"Full Docker demo example"),ko.forEach(t),Uo.forEach(t),er=u(sa),Wt=l(sa,"LI",{});var bo=r(Wt);We=l(bo,"A",{href:!0});var So=r(We);tr=n(So,"List of Docker Spaces examples"),So.forEach(t),bo.forEach(t),sa.forEach(t),this.h()},h(){c($,"name","hf:doc:metadata"),c($,"content",JSON.stringify(Do)),c(Y,"id","docker-spaces"),c(Y,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Y,"href","#docker-spaces"),c(b,"class","relative group"),c(ue,"href","https://docs.docker.com/get-started/"),c(ue,"rel","nofollow"),c(Q,"id","setting-up-docker-spaces"),c(Q,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Q,"href","#setting-up-docker-spaces"),c(R,"class","relative group"),c(de,"href","https://huggingface.co/new-space"),c(de,"rel","nofollow"),c(H,"id","secrets-and-variables-management"),c(H,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(H,"href","#secrets-and-variables-management"),c(I,"class","relative group"),c(Pe,"id","secret-management"),c(O,"id","variables"),c(O,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(O,"href","#variables"),c(N,"class","relative group"),c(Z,"id","buildtime"),c(Z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(Z,"href","#buildtime"),c(D,"class","relative group"),c(Ee,"href","https://docs.docker.com/engine/reference/builder/#arg"),c(Ee,"rel","nofollow"),c(W,"id","runtime"),c(W,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(W,"href","#runtime"),c(V,"class","relative group"),c(L,"id","secrets"),c(L,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(L,"href","#secrets"),c(B,"class","relative group"),c(z,"id","buildtime"),c(z,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(z,"href","#buildtime"),c(G,"class","relative group"),c(xe,"href","./spaces-overview#managing-secrets-and-environment-variables"),c(K,"id","runtime"),c(K,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(K,"href","#runtime"),c(C,"class","relative group"),c(_e,"href","https://huggingface.co/spaces/DockerTemplates/secret-example"),c(_e,"rel","nofollow"),c(ee,"id","permissions"),c(ee,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ee,"href","#permissions"),c(P,"class","relative group"),c(re,"id","data-persistence"),c(re,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(re,"href","#data-persistence"),c(X,"class","relative group"),c(He,"href","./spaces-storage"),c(Ne,"href","https://huggingface.co/spaces/julien-c/persistent-data"),c(Ne,"rel","nofollow"),c(ne,"href","https://huggingface.co/docs/huggingface_hub/index"),c(ne,"rel","nofollow"),c(ie,"id","read-more"),c(ie,"class","header-link block pr-1.5 text-lg no-hover:hidden with-hover:absolute with-hover:p-1.5 with-hover:opacity-0 with-hover:group-hover:opacity-100 with-hover:right-full"),c(ie,"href","#read-more"),c(x,"class","relative group"),c(Ze,"href","spaces-sdks-docker-first-demo"),c(We,"href","spaces-sdks-docker-examples")},m(e,i){s(document.head,$),p(e,U,i),p(e,b,i),s(b,Y),s(Y,tt),w(he,tt,null),s(b,aa),s(b,st),s(st,la),p(e,zt,i),p(e,F,i),s(F,ra),s(F,ue),s(ue,oa),s(F,na),p(e,qt,i),p(e,R,i),s(R,Q),s(Q,at),w(fe,at,null),s(R,ia),s(R,lt),s(lt,pa),p(e,Kt,i),p(e,f,i),s(f,ca),s(f,rt),s(rt,ha),s(f,ua),s(f,de),s(de,fa),s(f,da),s(f,ot),s(ot,ma),s(f,ya),s(f,nt),s(nt,wa),s(f,va),s(f,it),s(it,Ea),s(f,Ma),s(f,pt),s(pt,$a),s(f,Ua),s(f,ct),s(ct,ka),s(f,ba),s(f,ht),s(ht,Sa),s(f,Ta),s(f,ut),s(ut,_a),s(f,ga),s(f,ft),s(ft,ja),s(f,Ja),s(f,dt),s(dt,Aa),s(f,Ra),p(e,es,i),w(me,e,i),p(e,ts,i),p(e,Ge,i),s(Ge,Ia),p(e,ss,i),p(e,Ce,i),s(Ce,Na),p(e,as,i),p(e,I,i),s(I,H),s(H,mt),w(ye,mt,null),s(I,Da),s(I,yt),s(yt,Va),p(e,ls,i),p(e,Pe,i),p(e,rs,i),p(e,N,i),s(N,O),s(O,wt),w(we,wt,null),s(N,Ba),s(N,vt),s(vt,Ga),p(e,os,i),p(e,D,i),s(D,Z),s(Z,Et),w(ve,Et,null),s(D,Ca),s(D,Mt),s(Mt,Pa),p(e,ns,i),p(e,T,i),s(T,Xa),s(T,$t),s($t,xa),s(T,Ya),s(T,Ee),s(Ee,Fa),s(T,Qa),p(e,is,i),w(Me,e,i),p(e,ps,i),p(e,V,i),s(V,W),s(W,Ut),w($e,Ut,null),s(V,Ha),s(V,kt),s(kt,Oa),p(e,cs,i),p(e,Xe,i),s(Xe,Za),p(e,hs,i),p(e,B,i),s(B,L),s(L,bt),w(Ue,bt,null),s(B,Wa),s(B,St),s(St,La),p(e,us,i),p(e,G,i),s(G,z),s(z,Tt),w(ke,Tt,null),s(G,za),s(G,_t),s(_t,qa),p(e,fs,i),p(e,q,i),s(q,Ka),s(q,xe),s(xe,el),s(q,tl),p(e,ds,i),p(e,_,i),s(_,sl),s(_,gt),s(gt,al),s(_,ll),s(_,jt),s(jt,rl),s(_,ol),p(e,ms,i),p(e,Ye,i),s(Ye,nl),p(e,ys,i),w(be,e,i),p(e,ws,i),w(Se,e,i),p(e,vs,i),p(e,C,i),s(C,K),s(K,Jt),w(Te,Jt,null),s(C,il),s(C,At),s(At,pl),p(e,Es,i),p(e,g,i),s(g,cl),s(g,Rt),s(Rt,hl),s(g,ul),s(g,_e),s(_e,fl),s(g,dl),p(e,Ms,i),p(e,P,i),s(P,ee),s(ee,It),w(ge,It,null),s(P,ml),s(P,Nt),s(Nt,yl),p(e,$s,i),p(e,j,i),s(j,wl),s(j,Dt),s(Dt,vl),s(j,El),s(j,Vt),s(Vt,Ml),s(j,$l),p(e,Us,i),w(je,e,i),p(e,ks,i),w(te,e,i),p(e,bs,i),p(e,k,i),s(k,Ul),s(k,Bt),s(Bt,kl),s(k,bl),s(k,Gt),s(Gt,Sl),s(k,Tl),s(k,Ct),s(Ct,_l),s(k,gl),s(k,Pt),s(Pt,jl),s(k,Jl),p(e,Ss,i),w(Je,e,i),p(e,Ts,i),p(e,Fe,i),s(Fe,Al),p(e,_s,i),w(se,e,i),p(e,gs,i),p(e,ae,i),s(ae,Rl),s(ae,Xt),s(Xt,Il),s(ae,Nl),p(e,js,i),w(Ae,e,i),p(e,Js,i),p(e,Qe,i),s(Qe,Dl),p(e,As,i),w(Re,e,i),p(e,Rs,i),p(e,le,i),s(le,Vl),s(le,xt),s(xt,Bl),s(le,Gl),p(e,Is,i),p(e,X,i),s(X,re),s(re,Yt),w(Ie,Yt,null),s(X,Cl),s(X,Ft),s(Ft,Pl),p(e,Ns,i),p(e,oe,i),s(oe,Xl),s(oe,He),s(He,xl),s(oe,Yl),p(e,Ds,i),p(e,J,i),s(J,Fl),s(J,Ne),s(Ne,Ql),s(J,Hl),s(J,ne),s(ne,Qt),s(Qt,Ol),s(ne,Zl),s(J,Wl),p(e,Vs,i),p(e,Oe,i),s(Oe,Ll),p(e,Bs,i),p(e,x,i),s(x,ie),s(ie,Ht),w(De,Ht,null),s(x,zl),s(x,Ot),s(Ot,ql),p(e,Gs,i),p(e,pe,i),s(pe,Zt),s(Zt,Ze),s(Ze,Kl),s(pe,er),s(pe,Wt),s(Wt,We),s(We,tr),Cs=!0},p(e,[i]){const Ve={};i&2&&(Ve.$$scope={dirty:i,ctx:e}),te.$set(Ve);const Lt={};i&2&&(Lt.$$scope={dirty:i,ctx:e}),se.$set(Lt)},i(e){Cs||(v(he.$$.fragment,e),v(fe.$$.fragment,e),v(me.$$.fragment,e),v(ye.$$.fragment,e),v(we.$$.fragment,e),v(ve.$$.fragment,e),v(Me.$$.fragment,e),v($e.$$.fragment,e),v(Ue.$$.fragment,e),v(ke.$$.fragment,e),v(be.$$.fragment,e),v(Se.$$.fragment,e),v(Te.$$.fragment,e),v(ge.$$.fragment,e),v(je.$$.fragment,e),v(te.$$.fragment,e),v(Je.$$.fragment,e),v(se.$$.fragment,e),v(Ae.$$.fragment,e),v(Re.$$.fragment,e),v(Ie.$$.fragment,e),v(De.$$.fragment,e),Cs=!0)},o(e){E(he.$$.fragment,e),E(fe.$$.fragment,e),E(me.$$.fragment,e),E(ye.$$.fragment,e),E(we.$$.fragment,e),E(ve.$$.fragment,e),E(Me.$$.fragment,e),E($e.$$.fragment,e),E(Ue.$$.fragment,e),E(ke.$$.fragment,e),E(be.$$.fragment,e),E(Se.$$.fragment,e),E(Te.$$.fragment,e),E(ge.$$.fragment,e),E(je.$$.fragment,e),E(te.$$.fragment,e),E(Je.$$.fragment,e),E(se.$$.fragment,e),E(Ae.$$.fragment,e),E(Re.$$.fragment,e),E(Ie.$$.fragment,e),E(De.$$.fragment,e),Cs=!1},d(e){t($),e&&t(U),e&&t(b),M(he),e&&t(zt),e&&t(F),e&&t(qt),e&&t(R),M(fe),e&&t(Kt),e&&t(f),e&&t(es),M(me,e),e&&t(ts),e&&t(Ge),e&&t(ss),e&&t(Ce),e&&t(as),e&&t(I),M(ye),e&&t(ls),e&&t(Pe),e&&t(rs),e&&t(N),M(we),e&&t(os),e&&t(D),M(ve),e&&t(ns),e&&t(T),e&&t(is),M(Me,e),e&&t(ps),e&&t(V),M($e),e&&t(cs),e&&t(Xe),e&&t(hs),e&&t(B),M(Ue),e&&t(us),e&&t(G),M(ke),e&&t(fs),e&&t(q),e&&t(ds),e&&t(_),e&&t(ms),e&&t(Ye),e&&t(ys),M(be,e),e&&t(ws),M(Se,e),e&&t(vs),e&&t(C),M(Te),e&&t(Es),e&&t(g),e&&t(Ms),e&&t(P),M(ge),e&&t($s),e&&t(j),e&&t(Us),M(je,e),e&&t(ks),M(te,e),e&&t(bs),e&&t(k),e&&t(Ss),M(Je,e),e&&t(Ts),e&&t(Fe),e&&t(_s),M(se,e),e&&t(gs),e&&t(ae),e&&t(js),M(Ae,e),e&&t(Js),e&&t(Qe),e&&t(As),M(Re,e),e&&t(Rs),e&&t(le),e&&t(Is),e&&t(X),M(Ie),e&&t(Ns),e&&t(oe),e&&t(Ds),e&&t(J),e&&t(Vs),e&&t(Oe),e&&t(Bs),e&&t(x),M(De),e&&t(Gs),e&&t(pe)}}}const Do={local:"docker-spaces",sections:[{local:"setting-up-docker-spaces",title:"Setting up Docker Spaces"},{local:"secrets-and-variables-management",sections:[{local:"variables",sections:[{local:"buildtime",title:"Buildtime"},{local:"runtime",title:"Runtime"}],title:"Variables"},{local:"secrets",sections:[{local:"buildtime",title:"Buildtime"},{local:"runtime",title:"Runtime"}],title:"Secrets"}],title:"Secrets and Variables Management"},{local:"permissions",title:"Permissions"},{local:"data-persistence",title:"Data Persistence"},{local:"read-more",title:"Read More"}],title:"Docker Spaces"};function Vo(Be){return Ao(()=>{new URLSearchParams(window.location.search).get("fw")}),[]}class Xo extends _o{constructor($){super();go(this,$,Vo,No,jo,{})}}export{Xo as default,Do as metadata};
