forked from TrueCloudLab/distribution
Updating for Hugo
Updating for tooling tests Updating with the new sed scripts to protect links updating with new image Updating with comments Signed-off-by: Mary Anthony <mary@docker.com>
This commit is contained in:
parent
e57e731821
commit
832cb9d52c
23 changed files with 249 additions and 140 deletions
15
Makefile
15
Makefile
|
@ -64,18 +64,3 @@ clean:
|
|||
@rm -rf "${PREFIX}/bin/registry" "${PREFIX}/bin/registry-api-descriptor-template"
|
||||
|
||||
|
||||
# Use the existing docs build cmds from docker/docker
|
||||
# Later, we will move this into an import
|
||||
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
|
||||
DOCSPORT := 8000
|
||||
DOCKER_DOCS_IMAGE := docker-docs-$(VERSION)
|
||||
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
|
||||
|
||||
docs: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(DOCSPORT):8000 "$(DOCKER_DOCS_IMAGE)" mkdocs serve
|
||||
|
||||
docs-shell: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(DOCSPORT):8000 "$(DOCKER_DOCS_IMAGE)" bash
|
||||
|
||||
docs-build:
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" -f docs/Dockerfile .
|
||||
|
|
|
@ -1,37 +1,24 @@
|
|||
FROM docs/base:latest
|
||||
MAINTAINER Mary <mary@docker.com> (@moxiegirl)
|
||||
FROM docs/base:hugo
|
||||
MAINTAINER Mary Anthony <mary@docker.com> (@moxiegirl)
|
||||
|
||||
# to get the git info for this repo
|
||||
# To get the git info for this repo
|
||||
COPY . /src
|
||||
|
||||
# Reset the /docs dir so we can replace the theme meta with the new repo's git info
|
||||
RUN git reset --hard
|
||||
COPY . /docs/content/distribution/
|
||||
|
||||
RUN grep "VERSION =" /src/version/version.go | sed 's/.*"\(.*\)".*/\1/' > /docs/VERSION
|
||||
|
||||
|
||||
#
|
||||
# RUN git describe --match 'v[0-9]*' --dirty='.m' --always > /docs/VERSION
|
||||
# The above line causes a floating point error in our tools
|
||||
#
|
||||
COPY docs/* /docs/sources/registry/
|
||||
COPY docs/images/* /docs/sources/registry/images/
|
||||
COPY docs/spec/* /docs/sources/registry/spec/
|
||||
COPY docs/spec/auth/* /docs/sources/registry/spec/auth/
|
||||
COPY docs/storage-drivers/* /docs/sources/registry/storage-drivers/
|
||||
COPY docs/mkdocs.yml /docs/mkdocs-distribution.yml
|
||||
|
||||
RUN sed -i.old '1s;^;no_version_dropdown: true;' \
|
||||
/docs/sources/registry/*.md \
|
||||
/docs/sources/registry/spec/*.md \
|
||||
/docs/sources/registry/spec/auth/*.md \
|
||||
/docs/sources/registry/storage-drivers/*.md
|
||||
|
||||
RUN sed -i.old -e '/^<!--GITHUB/g' -e '/^IGNORES-->/g'\
|
||||
/docs/sources/registry/*.md \
|
||||
/docs/sources/registry/spec/*.md \
|
||||
/docs/sources/registry/spec/auth/*.md \
|
||||
/docs/sources/registry/storage-drivers/*.md
|
||||
|
||||
# Then build everything together, ready for mkdocs
|
||||
RUN /docs/build.sh
|
||||
# Sed to process GitHub Markdown
|
||||
# 1-2 Remove comment code from metadata block
|
||||
# 3 Remove .md extension from link text
|
||||
# 4 Change ](/ to ](/project/ in links
|
||||
# 5 Change ](word) to ](/project/word)
|
||||
# 6 Change ](../../ to ](/project/
|
||||
# 7 Change ](../ to ](/project/word)
|
||||
#
|
||||
#
|
||||
RUN find /docs/content/distribution -type f -name "*.md" -exec sed -i.old \
|
||||
-e '/^<!.*metadata]>/g' \
|
||||
-e '/^<!.*end-metadata.*>/g' \
|
||||
-e 's/\([(]\)\(.*\)\(\.md\)/\1\2/g' \
|
||||
-e 's/\(\]\)\([(]\)\(\/\)/\1\2\/distribution\//g' \
|
||||
-e 's/\(\][(]\)\([A-z]*[)]\)/\]\(\/distribution\/\2/g' \
|
||||
-e 's/\(\][(]\)\(\.\.\/\)/\1\/distribution\//g' {} \;
|
55
docs/Makefile
Normal file
55
docs/Makefile
Normal file
|
@ -0,0 +1,55 @@
|
|||
.PHONY: all binary build cross default docs docs-build docs-shell shell test test-unit test-integration test-integration-cli test-docker-py validate
|
||||
|
||||
# env vars passed through directly to Docker's build scripts
|
||||
# to allow things like `make DOCKER_CLIENTONLY=1 binary` easily
|
||||
# `docs/sources/contributing/devenvironment.md ` and `project/PACKAGERS.md` have some limited documentation of some of these
|
||||
DOCKER_ENVS := \
|
||||
-e BUILDFLAGS \
|
||||
-e DOCKER_CLIENTONLY \
|
||||
-e DOCKER_EXECDRIVER \
|
||||
-e DOCKER_GRAPHDRIVER \
|
||||
-e TESTDIRS \
|
||||
-e TESTFLAGS \
|
||||
-e TIMEOUT
|
||||
# note: we _cannot_ add "-e DOCKER_BUILDTAGS" here because even if it's unset in the shell, that would shadow the "ENV DOCKER_BUILDTAGS" set in our Dockerfile, which is very important for our official builds
|
||||
|
||||
# to allow `make DOCSDIR=docs docs-shell` (to create a bind mount in docs)
|
||||
DOCS_MOUNT := $(if $(DOCSDIR),-v $(CURDIR)/$(DOCSDIR):/$(DOCSDIR))
|
||||
|
||||
# to allow `make DOCSPORT=9000 docs`
|
||||
DOCSPORT := 8000
|
||||
|
||||
# Get the IP ADDRESS
|
||||
DOCKER_IP=$(shell python -c "import urlparse ; print urlparse.urlparse('$(DOCKER_HOST)').hostname or ''")
|
||||
HUGO_BASE_URL=$(shell test -z "$(DOCKER_IP)" && echo localhost || echo "$(DOCKER_IP)")
|
||||
HUGO_BIND_IP=0.0.0.0
|
||||
|
||||
GIT_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>/dev/null)
|
||||
DOCKER_IMAGE := docker$(if $(GIT_BRANCH),:$(GIT_BRANCH))
|
||||
DOCKER_DOCS_IMAGE := docs-base$(if $(GIT_BRANCH),:$(GIT_BRANCH))
|
||||
|
||||
|
||||
DOCKER_RUN_DOCS := docker run --rm -it $(DOCS_MOUNT) -e AWS_S3_BUCKET -e NOCACHE
|
||||
|
||||
# for some docs workarounds (see below in "docs-build" target)
|
||||
GITCOMMIT := $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
|
||||
default: docs
|
||||
|
||||
docs: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
|
||||
|
||||
docs-draft: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 -e DOCKERHOST "$(DOCKER_DOCS_IMAGE)" hugo server --buildDrafts="true" --port=$(DOCSPORT) --baseUrl=$(HUGO_BASE_URL) --bind=$(HUGO_BIND_IP)
|
||||
|
||||
|
||||
docs-shell: docs-build
|
||||
$(DOCKER_RUN_DOCS) -p $(if $(DOCSPORT),$(DOCSPORT):)8000 "$(DOCKER_DOCS_IMAGE)" bash
|
||||
|
||||
|
||||
docs-build:
|
||||
# ( git remote | grep -v upstream ) || git diff --name-status upstream/release..upstream/docs ./ > ./changed-files
|
||||
# echo "$(GIT_BRANCH)" > GIT_BRANCH
|
||||
# echo "$(AWS_S3_BUCKET)" > AWS_S3_BUCKET
|
||||
# echo "$(GITCOMMIT)" > GITCOMMIT
|
||||
docker build -t "$(DOCKER_DOCS_IMAGE)" .
|
|
@ -1,3 +1,9 @@
|
|||
<!--[metadata]>
|
||||
+++
|
||||
draft = "true"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Architecture
|
||||
|
||||
## Design
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<!--[metadata]>
|
||||
+++
|
||||
draft = "true"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Build the development environment
|
||||
|
||||
The first prequisite of properly building distribution targets is to have a Go
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
<!--GITHUB
|
||||
page_title: Configure a Registry
|
||||
page_description: Explains how to configure a registry
|
||||
page_keywords: registry, service, images, repository, configuration
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Configure a Registry"
|
||||
description = "Explains how to deploy a registry"
|
||||
keywords = ["registry, service, images, repository"]
|
||||
[menu.main]
|
||||
parent="smn_registry"
|
||||
weight=2
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
|
||||
# Registry Configuration Reference
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
<!--GITHUB
|
||||
page_title: Deploying a registry server
|
||||
page_description: Explains how to deploy a registry server
|
||||
page_keywords: registry, service, images, repository, deploy
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Deploying a registry server"
|
||||
description = "Explains how to deploy a registry server"
|
||||
keywords = ["registry, service, images, repository"]
|
||||
[menu.main]
|
||||
parent="smn_registry"
|
||||
weight=1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Deploying a registry server
|
||||
|
||||
|
|
|
@ -1,17 +0,0 @@
|
|||
# Project
|
||||
|
||||
## Contents
|
||||
- [Docker Registry 2.0](index.md)
|
||||
- [Architecture](architecture.md)
|
||||
- [Build the development environment](building.md)
|
||||
- [Configure a registry](configuration.md)
|
||||
- [Deploying a registry server](deploying.md)
|
||||
- [Microsoft Azure storage driver](storage-drivers/azure.md)
|
||||
- [Filesystem storage driver](storage-drivers/filesystem.md)
|
||||
- [In-memory storage driver](storage-drivers/inmemory.md)
|
||||
- [S3 storage driver](storage-drivers/s3.md)
|
||||
- [Notifications](notifications.md)
|
||||
- [Docker Registry HTTP API V2](spec/api.md)
|
||||
- [Docker Registry v2 authentication via central service](spec/auth/token.md)
|
||||
- [Docker Distribution JSON Canonicalization](spec/json.md)
|
||||
- [Docker-Registry Storage Driver](storagedrivers.md)
|
|
@ -1,8 +1,8 @@
|
|||
<!--GITHUB
|
||||
page_title: Distribution glossary
|
||||
page_description: Provides definition for distribution terms
|
||||
page_keywords: registry, service, images, repository, distribution, glossary, layer, blob
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = "true"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Glossary
|
||||
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<!--[metadata]>
|
||||
+++
|
||||
draft = "true"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Migrating a 1.0 registry to 2.0
|
||||
|
||||
TODO: This needs to be revised in light of Olivier's work
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
<!--GITHUB
|
||||
page_title: Work with Notifications
|
||||
page_description: Explains how to deploy a registry server
|
||||
page_keywords: registry, service, images, repository
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Work with Notifications"
|
||||
description = "Explains work with registry notifications"
|
||||
keywords = ["registry, service, images, notifications, repository"]
|
||||
[menu.main]
|
||||
parent="smn_registry"
|
||||
weight=1
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
|
||||
# Notifications
|
||||
|
|
|
@ -1,3 +1,9 @@
|
|||
<!--[metadata]>
|
||||
+++
|
||||
draft = "true"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# OS X Setup Guide
|
||||
|
||||
This guide will walk you through running the new Go based [Docker registry](https://github.com/docker/distribution) on your local OS X machine.
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: Docker Registry 2.0
|
||||
page_description: Introduces the Docker Registry
|
||||
page_keywords: registry, images, repository
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Docker Registry 2.0"
|
||||
description = "Introduces the Docker Registry"
|
||||
keywords = ["registry, images, repository"]
|
||||
[menu.main]
|
||||
parent="smn_registry"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Docker Registry
|
||||
|
|
@ -1,8 +1,14 @@
|
|||
<!--GITHUB
|
||||
page_title: Docker Registry HTTP API V2
|
||||
page_description: Explains how to use registry API
|
||||
page_keywords: registry, service, driver, images, storage, api
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = true
|
||||
title = "Docker Registry HTTP API V2"
|
||||
description = "This is a specification for the API."
|
||||
keywords = ["registry, service, driver, images, storage, api"]
|
||||
[menu.main]
|
||||
parent="smn_registry_ref"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Docker Registry HTTP API V2
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: Docker Registry HTTP API V2
|
||||
page_description: Explains how to use registry API
|
||||
page_keywords: registry, service, driver, images, storage, api
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
draft = true
|
||||
title = "Docker Registry HTTP API V2"
|
||||
description = "This is a specification for the API."
|
||||
keywords = ["registry, service, driver, images, storage, api"]
|
||||
[menu.main]
|
||||
parent="smn_registry_ref"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
# Docker Registry HTTP API V2
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: Docker Registry v2 Authentication
|
||||
page_description: Introduces the Docker Registry v2 authentication
|
||||
page_keywords: registry, images, repository, v2, authentication
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Docker Registry v2 Authentication"
|
||||
description = "Introduces the Docker Registry v2 authentication"
|
||||
keywords = ["registry, images, repository, v2, authentication"]
|
||||
[menu.main]
|
||||
parent="smn_registry_ref"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
|
||||
# Docker Registry v2 authentication via central service
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: Docker Distribution JSON Canonicalization
|
||||
page_description: Explains registry JSON objects
|
||||
page_keywords: registry, service, images, repository, json
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Docker Distribution JSON Canonicalization"
|
||||
description = "Explains registry JSON objects"
|
||||
keywords = ["registry, service, images, repository, json"]
|
||||
[menu.main]
|
||||
parent="smn_registry_ref"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
|
||||
# Docker Distribution JSON Canonicalization
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: Microsoft Azure storage driver
|
||||
page_description: Explains how to use the Azure storage drivers
|
||||
page_keywords: registry, service, driver, images, storage, azure
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Microsoft Azure storage driver"
|
||||
description = "Explains how to use the Azure storage drivers"
|
||||
keywords = ["registry, service, driver, images, storage, azure"]
|
||||
[menu.main]
|
||||
parent="smn_registry_drivers"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Microsoft Azure storage driver
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: Filesystem storage driver
|
||||
page_description: Explains how to use the filesystem storage drivers
|
||||
page_keywords: registry, service, driver, images, storage, filesystem
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Filesystem storage driver"
|
||||
description = "Explains how to use the filesystem storage drivers"
|
||||
keywords = ["registry, service, driver, images, storage, filesystem"]
|
||||
[menu.main]
|
||||
parent="smn_registry_drivers"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Filesystem storage driver
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: In-memory storage driver
|
||||
page_description: Explains how to use the in-memory storage drivers
|
||||
page_keywords: registry, service, driver, images, storage, in-memory
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "In-memory storage driver"
|
||||
description = "Explains how to use the in-memory storage drivers"
|
||||
keywords = ["registry, service, driver, images, storage, in-memory"]
|
||||
[menu.main]
|
||||
parent="smn_registry_drivers"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# In-memory storage driver
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: Ceph RADOS storage driver
|
||||
page_description: Explains how to use the Ceph RADOS storage driver
|
||||
page_keywords: registry, service, driver, images, storage, ceph, rados
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Ceph RADOS storage driver"
|
||||
description = "Explains how to use the Ceph RADOS storage driver"
|
||||
keywords = ["registry, service, driver, images, storage, ceph, rados"]
|
||||
[menu.main]
|
||||
parent="smn_registry_drivers"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Ceph RADOS storage driver
|
||||
|
||||
|
|
|
@ -1,8 +1,13 @@
|
|||
<!--GITHUB
|
||||
page_title: S3 storage driver
|
||||
page_description: Explains how to use the S3 storage drivers
|
||||
page_keywords: registry, service, driver, images, storage, S3
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "S3 storage driver"
|
||||
description = "Explains how to use the S3 storage drivers"
|
||||
keywords = ["registry, service, driver, images, storage, S3"]
|
||||
[menu.main]
|
||||
parent="smn_registry_drivers"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# S3 storage driver
|
||||
|
||||
|
|
|
@ -1,8 +1,14 @@
|
|||
<!--GITHUB
|
||||
page_title: Docker Registry Storage Driver
|
||||
page_description: Explains how to use the storage drivers
|
||||
page_keywords: registry, service, driver, images, storage
|
||||
IGNORES-->
|
||||
<!--[metadata]>
|
||||
+++
|
||||
title = "Docker Registry Storage Driver"
|
||||
description = "Explains how to use the storage drivers"
|
||||
keywords = ["registry, service, driver, images, storage"]
|
||||
[menu.main]
|
||||
parent="smn_registry_ref"
|
||||
identifier="smn_registry_drivers"
|
||||
+++
|
||||
<![end-metadata]-->
|
||||
|
||||
|
||||
# Docker Registry Storage Driver
|
||||
|
||||
|
|
Loading…
Reference in a new issue