2015-07-19 23:11:05 +00:00
|
|
|
FROM docs/base:latest
|
2015-06-08 00:58:53 +00:00
|
|
|
MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl)
|
2015-04-01 18:28:34 +00:00
|
|
|
|
2015-06-08 00:58:53 +00:00
|
|
|
# To get the git info for this repo
|
2015-04-01 18:28:34 +00:00
|
|
|
COPY . /src
|
|
|
|
|
2015-06-16 13:00:24 +00:00
|
|
|
COPY . /docs/content/registry/
|
2015-06-08 00:58:53 +00:00
|
|
|
|
|
|
|
# Sed to process GitHub Markdown
|
|
|
|
# 1-2 Remove comment code from metadata block
|
2015-06-16 13:00:24 +00:00
|
|
|
# 3 Change ](/word to ](/project/ in links
|
|
|
|
# 4 Change ](word.md) to ](/project/word)
|
|
|
|
# 5 Remove .md extension from link text
|
|
|
|
# 6 Change ](./ to ](/project/word)
|
|
|
|
# 7 Change ](../../ to ](/project/
|
|
|
|
# 8 Change ](../ to ](/project/
|
2015-06-08 00:58:53 +00:00
|
|
|
#
|
2015-06-16 13:00:24 +00:00
|
|
|
RUN find /docs/content/registry -type f -name "*.md" -exec sed -i.old \
|
2015-06-08 00:58:53 +00:00
|
|
|
-e '/^<!.*metadata]>/g' \
|
|
|
|
-e '/^<!.*end-metadata.*>/g' \
|
2015-06-16 13:00:24 +00:00
|
|
|
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/registry\//g' \
|
2015-06-18 01:58:53 +00:00
|
|
|
-e 's/\(\][(]\)\([A-Za-z0-9]*\)\(\.md\)/\1\/registry\/\2/g' \
|
2015-06-16 13:00:24 +00:00
|
|
|
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
|
|
|
|
-e 's/\(\][(]\)\(\.\/\)/\1\/registry\//g' \
|
|
|
|
-e 's/\(\][(]\)\(\.\.\/\.\.\/\)/\1\/registry\//g' \
|
|
|
|
-e 's/\(\][(]\)\(\.\.\/\)/\1\/registry\//g' {} \;
|