mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-18 03:26:57 +02:00
parent
a8557f46ca
commit
8f1a6fbd6c
212 changed files with 552 additions and 502 deletions
|
@ -77,9 +77,9 @@
|
|||
}
|
||||
});
|
||||
</script></nav></div><div class="container mainContainer"><div class="wrapper"><div class="post"><header class="postHeader"><a class="edit-page-link button" href="https://crowdin.com/project/docusaurus/tr" target="_blank" rel="noreferrer noopener">Translate</a><h1 class="postHeaderTitle">Docker</h1></header><article><div><span><p><a href="https://www.docker.com/">Docker</a> is a tool that enables you to create, deploy, and manage lightweight, stand-alone packages that contain everything needed to run an application. It can help us to avoid conflicting dependencies & unwanted behavior when running Docusaurus.</p>
|
||||
<h2><a class="anchor" aria-hidden="true" id="run-the-local-webserver-in-docker"></a><a href="#run-the-local-webserver-in-docker" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Run the local webserver in docker</h2>
|
||||
<h2><a class="anchor" aria-hidden="true" id="run-the-local-web-server-in-docker"></a><a href="#run-the-local-web-server-in-docker" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Run the local web server in docker</h2>
|
||||
<p>Ensure you have previously installed <a href="https://www.docker.com/get-started">docker</a>.</p>
|
||||
<p>To run the local webserver:</p>
|
||||
<p>To run the local web server:</p>
|
||||
<ol>
|
||||
<li><p><strong>Build the docker image</strong> -- Enter the folder where you have Docusaurus installed. Run <code>docker build -t docusaurus-doc .</code></p>
|
||||
<p>Once the build phase finishes, you can verify the image exists by running <code>docker images</code>.</p>
|
||||
|
@ -90,7 +90,7 @@
|
|||
<p>This will start a docker container with the image <code>docusaurus-doc</code>. To see more detailed container info run <code>docker ps</code> .</p></li>
|
||||
</ol>
|
||||
<h2><a class="anchor" aria-hidden="true" id="use-docker-compose"></a><a href="#use-docker-compose" aria-hidden="true" class="hash-link"><svg class="hash-link-icon" aria-hidden="true" height="16" version="1.1" viewBox="0 0 16 16" width="16"><path fill-rule="evenodd" d="M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z"></path></svg></a>Use docker-compose</h2>
|
||||
<p>We can also use <code>docker-compose</code> to configure our application. This feature of docker allows you to run the webserver and any additional services with a single command.</p>
|
||||
<p>We can also use <code>docker-compose</code> to configure our application. This feature of docker allows you to run the web server and any additional services with a single command.</p>
|
||||
<blockquote>
|
||||
<p>Compose is a tool for defining and running multi-container Docker applications. With Compose, you use a YAML file to configure your application’s services. Then, with a single command, you create and start all the services from your configuration.</p>
|
||||
</blockquote>
|
||||
|
@ -122,9 +122,9 @@
|
|||
<span class="hljs-attr"> working_dir:</span> <span class="hljs-string">/app/website</span>
|
||||
|
||||
</code></pre>
|
||||
<p>To run a local webserver with <code>docker-compose</code> run <code>docker-compose up</code>.</p>
|
||||
<p>To run a local web server with <code>docker-compose</code> run <code>docker-compose up</code>.</p>
|
||||
<p>To build static HTML pages for publishing run <code>docker-compose run docusaurus bash -c 'yarn publish-gh-pages'</code></p>
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/tr/publishing"><span class="arrow-prev">← </span><span>Publishing your site</span></a><a class="docs-next button" href="/docs/tr/adding-blog"><span>Adding a Blog</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#run-the-local-webserver-in-docker">Run the local webserver in docker</a></li><li><a href="#use-docker-compose">Use docker-compose</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
</span></div></article></div><div class="docs-prevnext"><a class="docs-prev button" href="/docs/tr/publishing"><span class="arrow-prev">← </span><span>Publishing your site</span></a><a class="docs-next button" href="/docs/tr/adding-blog"><span>Adding a Blog</span><span class="arrow-next"> →</span></a></div></div></div><nav class="onPageNav"><ul class="toc-headings"><li><a href="#run-the-local-web-server-in-docker">Run the local web server in docker</a></li><li><a href="#use-docker-compose">Use docker-compose</a></li></ul></nav></div><footer class="nav-footer" id="footer"><section class="sitemap"><a href="/" class="nav-home"><img src="/img/docusaurus_monochrome.svg" alt="Docusaurus" width="66" height="58"/></a><div class="footerSection"><h5>Docs</h5><a href="
|
||||
/docs/tr/installation">Getting Started</a><a href="
|
||||
/docs/tr/versioning">Versioning</a><a href="
|
||||
/docs/tr/translation">Localization</a><a href="
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue