This optimizes the Dockerfile a bit by;
- putting the docs archives at the top to
optimize caching and to prevent having
to clone the github repository on each
build. Note that '--no-cache' is needed
to forcefully break the cache, but the
archives should not frequently change
- grouping RUN lines to reduce image size.
- using a loop for the archived versions to
reduce the amount of duplicated code.
- using the local files for the *current*
version of the docs instead of the git
clone from GitHub. this makes it also
use the right source instead of "master"
- adding a .dockerignore to prevent busting
the cache if not needed, and to prevent
uploading the '.git' repository, which
is not used for the "current" docs
Difference in size before/after;
REPOSITORY TAG IMAGE ID CREATED SIZE
docs latest 36f6ad029e6a 3 minutes ago 1.722 GB
docs-orig latest 4f1a3e3fda4f 16 minutes ago 3.344 GB
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Makes title, description, and keywords populate the right tags
See https://github.com/jekyll/jekyll-seo-tag
An example of this in action:
```
<!-- Begin Jekyll SEO tag v2.0.0 -->
<title>Docker Engine - Docker</title>
<meta property="og:title" content="Docker Engine" />
<meta name="description" content="Engine" />
<meta property="og:description" content="Engine" />
<meta property="og:site_name" content="Docker" />
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "WebPage",
"headline": "Docker Engine",
"description": "Engine",
"url": "/engine/"
}
</script>
<!-- End Jekyll SEO tag -->
```