Convert Library references from submodule to upstream (#4102)

* Step 1 of getting to upstream-based model

* Upstream part 2

* Working front-matter generation

* Pages generating

* TOC fixes, autogen fixes, test>prod script

* Boilerplate fix

* Switch to cat, redundancy removals
This commit is contained in:
John Mulhausen 2017-08-08 16:04:00 -07:00 committed by GitHub
parent f02981cb0a
commit 1c5153b965
145 changed files with 77 additions and 874 deletions

1
.gitignore vendored
View File

@ -6,3 +6,4 @@ _site/**
.sass-cache/**
CNAME
Gemfile.lock
_samples/library/**

4
.gitmodules vendored
View File

@ -10,7 +10,3 @@
path = tests/src/gopkg.in/yaml.v2
url = https://github.com/go-yaml/yaml.git
branch = a5b47d31c556af34a302ce5d659e6fea44d90de0
[submodule "samples/library"]
path = samples/library
url = https://github.com/docker-library/docs.git
branch = master

View File

@ -1,25 +0,0 @@
# Migration
This branch is the result of a migration of documentation from several public and
private repositories. Every attempt has been made to preserve the history of all
content which was migrated from public repositories, so that all public
contributors retain credit for their work, and so that `git log` and
`git blame` commands will work on historical files. At the time of the migration,
over 42,000 public commits already exist in these files, which shows what a
vibrant community the Docker documentation attracts. Thanks to everyone for their
contributions.
The following is a list of each public repository we imported from, the SHA
reference we imported, and its tag if relevant.
| Repository | SHA | Tag |
|----------------------------------------|-----------------|------------------------|
| https://github.com/docker/distribution | a9b1322edf48b1f | docs-v2.5.0-2016-07-28 |
| https://github.com/docker/compose | 429320a4f8f4040 | docs-v1.8.0-2016-08-03 |
| https://github.com/docker/swarm | 27968edd8a160f6 | v1.2.5 |
| https://github.com/docker/notary | a6fda67663e158d | docs-v0.3-2016-08-03 |
| https://github.com/docker/toolbox | c6457341499a196 | docs-v1.12.0-2016-09-16a |
| https://github.com/docker/opensource | b9b87bed67f4289 | docs-2016-08-03 |
| https://github.com/docker/kitematic | 02c9f9607128802 | v0.12.0 |
| https://github.com/docker/machine | 95041b4cfe2e8b2 | docs-v0.8.2-2016-09-28 |
| https://github.com/moby/moby | 3134c23b55eb100 | n/a |

View File

@ -14,6 +14,10 @@ url: https://docs.docker.com
keep_files: ["v1.4", "v1.5", "v1.6", "v1.7", "v1.8", "v1.9", "v1.10", "v1.11", "v1.12", "v1.13", "v17.03"]
compose_current: 1.14.0
collections:
samples:
output: true
gems:
- jekyll-redirect-from
- jekyll-seo-tag

View File

@ -1260,28 +1260,16 @@ samples:
title: ASP.NET Core + SQL Server on Linux
- path: /engine/examples/couchdb_data_volumes/
title: CouchDB
- path: /samples/couchbase/
title: Couchbase
nosync: true
- path: /compose/django/
title: Django and PostgreSQL
- path: /samples/mongo/
nosync: true
title: MongoDB
- path: /engine/examples/postgresql_service/
title: PostgreSQL
- path: /compose/rails/
title: Rails and PostgreSQL
- path: /samples/redis/
title: Redis
nosync: true
- path: /engine/examples/running_riak_service/
title: Riak
- path: /engine/examples/running_ssh_service/
title: SSHd
- path: /samples/wordpress/
title: WordPress
nosync: true
manuals:
- sectiontitle: Docker Enterprise Edition

View File

@ -1,3 +1,3 @@
{% if include.tocToGenerate=="library"%}{% for thisPage in site.pages %}{% if thisPage.url contains "/samples/" and thisPage.url != "/samples/" %}
{% if include.tocToGenerate=="library"%}{% for thisPage in site.samples %}
<li><a href="{{ thisPage.url}}"{% if page.url==thisPage.url %}{% assign topicFound="true" %} class="active currentPage"{% endif %}>{{ thisPage.title }}</a></li>
{% endif %}{% endfor %}{% endif %}
{% endfor %}{% endif %}

View File

@ -1,22 +0,0 @@
---
layout: docs
toc_min: 1
noratings: true
---
{% capture fileToUse %}{% if page.file %}{{ page.file }}{% else %}README.md{% endif %}{% endcapture %}
{% capture ghrepo %}{% include_relative library/{{ page.repo }}/github-repo %}{% endcapture %}
{% capture markdowncontent %}
{% include_relative library/{{ page.repo }}/README-short.txt %}
GitHub repo: [{{ ghrepo | strip }}]({{ ghrepo | strip}}){: target="_blank"}
> **Library reference**
>
> This content is imported from
> [the official Docker Library docs](https://github.com/docker-library/docs/tree/master/{{ page.repo}}/),
> and is provided by the original uploader. You can view the Docker Store page for this repo at
> [https://store.docker.com/images/{{ page.repo }}](https://store.docker.com/images/{{ page.repo }}).
{% include_relative library/{{ page.repo }}/{{ fileToUse }} %}
{% endcapture %}
{{ markdowncontent | markdownify }}

8
_samples/boilerplate.txt Normal file
View File

@ -0,0 +1,8 @@
> **Library reference**
>
> This content is imported from
> [the official Docker Library docs](https://github.com/docker-library/docs/tree/master/{{ page.repo}}/),
> and is provided by the original uploader. You can view the Docker Store page for this image at
> [https://store.docker.com/images/{{ page.repo }}](https://store.docker.com/images/{{ page.repo }})
<!-- content begin -->

View File

@ -18,6 +18,49 @@ svn co https://github.com/docker/docker-ce/"$ENGINE_SVN_BRANCH"/components/cli/d
svn co https://github.com/docker/docker-ce/"$ENGINE_SVN_BRANCH"/components/engine/docs/api md_source/engine/api || (echo "Failed engine/api download" && exit -1) # This will only get you the old API MD files 1.18 through 1.24
svn co https://github.com/docker/distribution/"$DISTRIBUTION_SVN_BRANCH"/docs/spec md_source/registry/spec || (echo "Failed registry/spec download" && exit -1)
# Get the Library docs
svn co https://github.com/docker-library/docs/trunk md_source/_samples/library || (echo "Failed library download" && exit -1)
# Remove symlinks to maintainer.md because they break jekyll and we don't use em
find md_source/_samples/library -maxdepth 9 -type l -delete
# Loop through the README.md files, turn them into rich index.md files
FILES=$(find md_source/_samples/library -type f -name 'README.md')
for f in $FILES
do
curdir=$(dirname "${f}")
justcurdir="${curdir##*/}"
if [ -e ${curdir}/README-short.txt ]
then
# shortrm=$(<${curdir}/README-short.txt)
shortrm=$(cat ${curdir}/README-short.txt)
fi
echo "Adding front-matter to ${f} ..."
echo --- >> ${curdir}/front-matter.txt
echo title: "${justcurdir}" >> ${curdir}/front-matter.txt
echo keywords: library, sample, ${justcurdir} >> ${curdir}/front-matter.txt
echo repo: "${justcurdir}" >> ${curdir}/front-matter.txt
echo layout: docs >> ${curdir}/front-matter.txt
echo permalink: /samples/library/${justcurdir}/ >> ${curdir}/front-matter.txt
echo description: \| >> ${curdir}/front-matter.txt
echo \ \ ${shortrm} >> ${curdir}/front-matter.txt
echo --- >> ${curdir}/front-matter.txt
echo >> ${curdir}/front-matter.txt
echo ${shortrm} >> ${curdir}/front-matter.txt
echo >> ${curdir}/front-matter.txt
if [ -e ${curdir}/github-repo ]
then
# gitrepo=$(<${curdir}/github-repo)
gitrepo=$(cat ${curdir}/github-repo)
echo >> ${curdir}/front-matter.txt
echo GitHub repo: \["${gitrepo}"\]\("${gitrepo}"\)\{: target="_blank"\} >> ${curdir}/front-matter.txt
echo >> ${curdir}/front-matter.txt
fi
cat ${curdir}/front-matter.txt md_source/_samples/boilerplate.txt > ${curdir}/header.txt
echo {% raw %} >> ${curdir}/header.txt
cat ${curdir}/header.txt ${curdir}/README.md > ${curdir}/index.md
echo {% endraw %} >> ${curdir}/index.md
rm -rf ${curdir}/front-matter.txt
rm -rf ${curdir}/header.txt
done
# Get the Engine APIs that are in Swagger
# Be careful with the locations on Github for these
@ -47,3 +90,4 @@ wget -O md_source/registry/configuration.md https://raw.githubusercontent.com/do
rm md_source/registry/spec/api.md.tmpl
rm -rf md_source/apidocs/cloud-api-source
rm -rf md_source/tests
rm md_source/_samples/library/index.md

View File

@ -9,4 +9,12 @@ layout: null
"description":{{ page.description | jsonify }},
"keywords":{{ page.keywords | jsonify }}
}
{% endif %}{% endfor %}]}
{% endif %}{% endfor %}
{% for page in site.samples %},
{
"url":{{ page.url | jsonify }},
"title":{{ page.title | jsonify }},
"description":{{ page.description | strip | jsonify }},
"keywords":{{ page.keywords | jsonify }}
}
{% endfor %}]}

View File

@ -1,5 +0,0 @@
---
layout: null
---
{% for page in site.pages %}{% for redirect in page.redirect_from %}{{ redirect }},{{ page.url }}
{% endfor %}{% endfor %}
1 ---
2 layout: null
3 ---
4 {% for page in site.pages %}{% for redirect in page.redirect_from %}{{ redirect }},{{ page.url }}
5 {% endfor %}{% endfor %}

View File

@ -1,6 +0,0 @@
---
title: Adminer
keywords: library, sample, Adminer
layout: library
repo: adminer
---

View File

@ -1,6 +0,0 @@
---
title: Aerospike
keywords: library, sample, Aerospike
layout: library
repo: aerospike
---

View File

@ -1,6 +0,0 @@
---
title: Alpine
keywords: library, sample, Alpine
layout: library
repo: alpine
---

View File

@ -1,6 +0,0 @@
---
title: Amazon Linux
keywords: library, sample, Amazon Linux
layout: library
repo: amazonlinux
---

View File

@ -1,6 +0,0 @@
---
title: ArangoDB
keywords: library, sample, ArangoDB
layout: library
repo: arangodb
---

View File

@ -1,6 +0,0 @@
---
title: Backdrop
keywords: library, sample, Backdrop
layout: library
repo: backdrop
---

View File

@ -1,6 +0,0 @@
---
title: Bash
keywords: library, sample, Bash
layout: library
repo: bash
---

View File

@ -1,6 +0,0 @@
---
title: Bonita
keywords: library, sample, Bonita
layout: library
repo: bonita
---

View File

@ -1,6 +0,0 @@
---
title: buildpack-deps
keywords: library, sample, buildpack-deps
layout: library
repo: buildpack-deps
---

View File

@ -1,6 +0,0 @@
---
title: BusyBox
keywords: library, sample, BusyBox
layout: library
repo: busybox
---

View File

@ -1,6 +0,0 @@
---
title: Cassandra
keywords: library, sample, Cassandra
layout: library
repo: cassandra
---

View File

@ -1,6 +0,0 @@
---
title: Celery
keywords: library, sample, Celery
layout: library
repo: celery
---

View File

@ -1,6 +0,0 @@
---
title: CentOS
keywords: library, sample, CentOS
layout: library
repo: centos
---

View File

@ -1,6 +0,0 @@
---
title: Chronograf
keywords: library, sample, Chronograf
layout: library
repo: chronograf
---

View File

@ -1,6 +0,0 @@
---
title: CirrOS
keywords: library, sample, CirrOS
layout: library
repo: cirros
---

View File

@ -1,6 +0,0 @@
---
title: Clear Linux
keywords: library, sample, Clear Linux
layout: library
repo: clearlinux
---

View File

@ -1,6 +0,0 @@
---
title: Clojure
keywords: library, sample, Clojure
layout: library
repo: clojure
---

View File

@ -1,6 +0,0 @@
---
title: Composer
keywords: library, sample, Composer
layout: library
repo: composer
---

View File

@ -1,6 +0,0 @@
---
title: Consul
keywords: library, sample, Consul
layout: library
repo: consul
---

View File

@ -1,6 +0,0 @@
---
title: Convertigo
keywords: library, sample, Convertigo
layout: library
repo: convertigo
---

View File

@ -1,8 +0,0 @@
---
title: Couchbase
keywords: library, sample, Couchbase
layout: library
repo: couchbase
redirect_from:
- /engine/examples/couchbase/
---

View File

@ -1,6 +0,0 @@
---
title: CouchDB
keywords: library, sample, CouchDB
layout: library
repo: couchdb
---

View File

@ -1,6 +0,0 @@
---
title: Crate
keywords: library, sample, Crate
layout: library
repo: crate
---

View File

@ -1,6 +0,0 @@
---
title: CRUX
keywords: library, sample, CRUX
layout: library
repo: crux
---

View File

@ -1,6 +0,0 @@
---
title: Debian
keywords: library, sample, Debian
layout: library
repo: debian
---

View File

@ -1,6 +0,0 @@
---
title: Django
keywords: library, sample, Django
layout: library
repo: django
---

View File

@ -1,6 +0,0 @@
---
title: Docker in Docker
keywords: library, sample, Docker in Docker
layout: library
repo: docker
---

View File

@ -1,6 +0,0 @@
---
title: Drupal
keywords: library, sample, Drupal
layout: library
repo: drupal
---

View File

@ -1,6 +0,0 @@
---
title: Eclipse Mosquitto
keywords: library, sample, Eclipse Mosquitto
layout: library
repo: eclipse-mosquitto
---

View File

@ -1,6 +0,0 @@
---
title: Eggdrop
keywords: library, sample, Eggdrop
layout: library
repo: eggdrop
---

View File

@ -1,6 +0,0 @@
---
title: Elasticsearch
keywords: library, sample, Elasticsearch
layout: library
repo: elasticsearch
---

View File

@ -1,6 +0,0 @@
---
title: Elixir
keywords: library, sample, Elixir
layout: library
repo: elixir
---

View File

@ -1,6 +0,0 @@
---
title: Erlang
keywords: library, sample, Erlang
layout: library
repo: erlang
---

View File

@ -1,6 +0,0 @@
---
title: Fedora
keywords: library, sample, Fedora
layout: library
repo: fedora
---

View File

@ -1,6 +0,0 @@
---
title: F#
keywords: library, sample, F#
layout: library
repo: fsharp
---

View File

@ -1,6 +0,0 @@
---
title: Gazebo
keywords: library, sample, Gazebo
layout: library
repo: gazebo
---

View File

@ -1,6 +0,0 @@
---
title: The GNU Compiler Collection (GCC)
keywords: library, sample, GNU Compiler Collection, GCC
layout: library
repo: gcc
---

View File

@ -1,6 +0,0 @@
---
title: GeoNetwork
keywords: library, sample, GeoNetwork
layout: library
repo: geonetwork
---

View File

@ -1,6 +0,0 @@
---
title: Ghost
keywords: library, sample, Ghost
layout: library
repo: ghost
---

View File

@ -1,6 +0,0 @@
---
title: Go (a.k.a., Golang)
keywords: library, sample, Go, Golang
layout: library
repo: golang
---

View File

@ -1,6 +0,0 @@
---
title: Gradle
keywords: library, sample, Gradle
layout: library
repo: gradle
---

View File

@ -1,6 +0,0 @@
---
title: Groovy
keywords: library, sample, Groovy
layout: library
repo: groovy
---

View File

@ -1,6 +0,0 @@
---
title: HAProxy
keywords: library, sample, HAProxy
layout: library
repo: haproxy
---

View File

@ -1,6 +0,0 @@
---
title: Haskell
keywords: library, sample, Haskell
layout: library
repo: haskell
---

View File

@ -1,6 +0,0 @@
---
title: Haxe
keywords: library, sample, Haxe
layout: library
repo: haxe
---

View File

@ -1,6 +0,0 @@
---
title: Apache httpd
keywords: library, sample, httpd, Apache
layout: library
repo: httpd
---

View File

@ -1,6 +0,0 @@
---
title: Hy (a.k.a., Hylang)
keywords: library, sample, Hy, Hylang
layout: library
repo: hylang
---

View File

@ -1,6 +0,0 @@
---
title: IBM® SDK, Java™ Technology Edition
keywords: library, sample, IBM Java, Java, IBM
layout: library
repo: ibmjava
---

View File

@ -29,11 +29,12 @@ repository]({{ labsbase }}).
These docs are imported from
[the official Docker Library docs](https://github.com/docker-library/docs/),
and help you use some of the most popular software that has been
"Dockerized."
"Dockerized" into Docker images.
| Software | Description |
{% for thisPage in site.pages %}{% if thisPage.url contains "/samples/" and thisPage.url != "/samples/" %}| [{{ thisPage.title }}]({{ thisPage.url }}) | {% capture shortxt %}{% include_relative library/{{ thisPage.repo }}/README-short.txt %}{% endcapture %}{{ shortxt | strip }} |
{% endif %}{% endfor %}
| Image name | Description |
| ---------- | ----------- |
{% for page in site.samples %}| [{{ page.title }}]({{ page.url }}) | {{ page.description | strip }} |
{% endfor %}
## Sample applications
@ -44,12 +45,8 @@ Run popular software using Docker.
| [apt-cacher-ng](/engine/examples/apt-cacher-ng) | Run a Dockerized apt-cacher-ng instance. |
| [ASP.NET Core + SQL Server on Linux](/compose/aspnet-mssql-compose) | Run a Dockerized ASP.NET Core + SQL Server environment. |
| [CouchDB](/engine/examples/couchdb_data_volumes) | Run a Dockerized CouchDB instance. |
| [Couchbase](/engine/examples/couchbase) | Run a Dockerized Couchbase instance. |
| [Django + PostgreSQL](/compose/django/) | Run a Dockerized Django + PostgreSQL environment. |
| [MongoDB](/engine/examples/mongodb) | Run a Dockerized MongoDB instance. |
| [PostgreSQL](/engine/examples/postgresql_service) | Run a Dockerized PosgreSQL instance. |
| [Rails + PostgreSQL](/compose/rails/) | Run a Dockerized Rails + PostgreSQL environment. |
| [Redis](/engine/examples/running_redis_service) | Run a Dockerized Redis instance. |
| [Riak](/engine/examples/running_riak_service) | Run a Dockerized Riak instance. |
| [SSHd](/engine/examples/running_ssh_service) | Run a Dockerized SSHd instance. |
| [WordPress](/compose/wordpress/) | Run a Dockerized WordPress instance. |

View File

@ -1,6 +0,0 @@
---
title: InfluxDB
keywords: library, sample, InfluxDB
layout: library
repo: influxdb
---

View File

@ -1,6 +0,0 @@
---
title: io.js
keywords: library, sample, io.js, npm
layout: library
repo: iojs
---

View File

@ -1,6 +0,0 @@
---
title: Irssi
keywords: library, sample, Irssi
layout: library
repo: irssi
---

View File

@ -1,6 +0,0 @@
---
title: Java
keywords: library, sample, Java
layout: library
repo: java
---

View File

@ -1,6 +0,0 @@
---
title: Jenkins
keywords: library, sample, Jenkins
layout: library
repo: jenkins
---

View File

@ -1,6 +0,0 @@
---
title: Jetty
keywords: library, sample, Java, Jetty
layout: library
repo: jetty
---

View File

@ -1,6 +0,0 @@
---
title: Joomla
keywords: library, sample, Joomla
layout: library
repo: joomla
---

View File

@ -1,6 +0,0 @@
---
title: JRuby
keywords: library, sample, JRuby
layout: library
repo: jruby
---

View File

@ -1,6 +0,0 @@
---
title: Julia
keywords: library, sample, Julia
layout: library
repo: julia
---

View File

@ -1,6 +0,0 @@
---
title: Kaazing Gateway
keywords: library, sample, Kaazing Gateway
layout: library
repo: kaazing-gateway
---

View File

@ -1,6 +0,0 @@
---
title: Kapacitor
keywords: library, sample, Kapacitor
layout: library
repo: kapacitor
---

View File

@ -1,6 +0,0 @@
---
title: Kibana
keywords: library, sample, Kibana, Elasticsearch
layout: library
repo: kibana
---

View File

@ -1,6 +0,0 @@
---
title: Known
keywords: library, sample, Known
layout: library
repo: known
---

View File

@ -1,6 +0,0 @@
---
title: Kong
keywords: library, sample, Kong
layout: library
repo: kong
---

@ -1 +0,0 @@
Subproject commit 7d03e2198f07a2e95c6ab9c04d26f168dc8fa1e6

View File

@ -1,6 +0,0 @@
---
title: Lightstreamer
keywords: library, sample, Lightstreamer
layout: library
repo: lightstreamer
---

View File

@ -1,6 +0,0 @@
---
title: Logstash
keywords: library, sample, Logstash
layout: library
repo: logstash
---

View File

@ -1,6 +0,0 @@
---
title: Mageia
keywords: library, sample, Mageia
layout: library
repo: mageia
---

View File

@ -1,6 +0,0 @@
---
title: MariaDB
keywords: library, sample, MariaDB
layout: library
repo: mariadb
---

View File

@ -1,6 +0,0 @@
---
title: Maven
keywords: library, sample, Maven
layout: library
repo: maven
---

View File

@ -1,6 +0,0 @@
---
title: Memcached
keywords: library, sample, Memcached
layout: library
repo: memcached
---

View File

@ -1,6 +0,0 @@
---
title: mongo-express
keywords: library, sample, mongo-express
layout: library
repo: mongo-express
---

View File

@ -1,8 +0,0 @@
---
title: MongoDB
keywords: library, sample, MongoDB
layout: library
repo: mongo
redirect_from:
- /engine/examples/mongodb/
---

View File

@ -1,6 +0,0 @@
---
title: Mono
keywords: library, sample, Mono
layout: library
repo: mono
---

View File

@ -1,6 +0,0 @@
---
title: MySQL
keywords: library, sample, MySQL
layout: library
repo: mysql
---

View File

@ -1,6 +0,0 @@
---
title: nats-streaming
keywords: library, sample, nats-streaming
layout: library
repo: nats-streaming
---

View File

@ -1,6 +0,0 @@
---
title: nats
keywords: library, sample, nats
layout: library
repo: nats
---

View File

@ -1,6 +0,0 @@
---
title: Neo4j
keywords: library, sample, Neo4j
layout: library
repo: neo4j
---

View File

@ -1,6 +0,0 @@
---
title: NeuroDebian
keywords: library, sample, NeuroDebian
layout: library
repo: neurodebian
---

View File

@ -1,6 +0,0 @@
---
title: Nextcloud
keywords: library, sample, Nextcloud
layout: library
repo: nextcloud
---

View File

@ -1,6 +0,0 @@
---
title: Nginx
keywords: library, sample, Nginx
layout: library
repo: nginx
---

View File

@ -1,6 +0,0 @@
---
title: Node.js
keywords: library, sample, Node.js
layout: library
repo: node
---

View File

@ -1,6 +0,0 @@
---
title: Notary
keywords: library, sample, Notary
layout: library
repo: notary
---

View File

@ -1,6 +0,0 @@
---
title: Nuxeo
keywords: library, sample, Nuxeo
layout: library
repo: nuxeo
---

View File

@ -1,6 +0,0 @@
---
title: Odoo
keywords: library, sample, Odoo
layout: library
repo: odoo
---

View File

@ -1,6 +0,0 @@
---
title: OpenJDK
keywords: library, sample, OpenJDK
layout: library
repo: openjdk
---

View File

@ -1,6 +0,0 @@
---
title: openSUSE
keywords: library, sample, openSUSE
layout: library
repo: opensuse
---

View File

@ -1,6 +0,0 @@
---
title: Oracle Linux
keywords: library, sample, Oracle Linux
layout: library
repo: oraclelinux
---

View File

@ -1,6 +0,0 @@
---
title: OrientDB
keywords: library, sample, OrientDB
layout: library
repo: orientdb
---

View File

@ -1,6 +0,0 @@
---
title: ownCloud
keywords: library, sample, ownCloud
layout: library
repo: owncloud
---

Some files were not shown because too many files have changed in this diff Show More