Add support for kramdown TOC.

This commit is contained in:
Adin Scannell
2020-05-06 14:15:19 -07:00
parent a10d5ed969
commit 5f3a256425
12 changed files with 32 additions and 3 deletions
+2
View File
@@ -1,5 +1,7 @@
# Performance Guide
[TOC]
gVisor is designed to provide a secure, virtualized environment while preserving
key benefits of containerization, such as small fixed overheads and a dynamic
resource footprint. For containerized infrastructure, this can provide a
+2
View File
@@ -1,5 +1,7 @@
# Resource Model
[TOC]
The resource model for gVisor does not assume a fixed number of threads of
execution (i.e. vCPUs) or amount of physical memory. Where possible, decisions
about underlying physical resources are delegated to the host system, where
+2
View File
@@ -1,5 +1,7 @@
# Security Model
[TOC]
gVisor was created in order to provide additional defense against the
exploitation of kernel bugs by untrusted userspace code. In order to understand
how gVisor achieves this goal, it is first necessary to understand the basic
+2
View File
@@ -1,5 +1,7 @@
# FAQ
[TOC]
### What operating systems are supported? {#supported-os}
Today, gVisor requires Linux.
+2
View File
@@ -1,5 +1,7 @@
# Checkpoint/Restore
[TOC]
gVisor has the ability to checkpoint a process, save its current state in a
state file, and restore into a new container using the state file.
+2
View File
@@ -1,5 +1,7 @@
# Applications
[TOC]
gVisor implements a large portion of the Linux surface and while we strive to
make it broadly compatible, there are (and always will be) unimplemented
features and bugs. The only real way to know if it will work is to try. If you
+2
View File
@@ -1,5 +1,7 @@
# Debugging
[TOC]
To enable debug and system call logging, add the `runtimeArgs` below to your
[Docker](../quick_start/docker/) configuration (`/etc/docker/daemon.json`):
+2
View File
@@ -1,5 +1,7 @@
# Filesystem
[TOC]
gVisor accesses the filesystem through a file proxy, called the Gofer. The gofer
runs as a separate process, that is isolated from the sandbox. Gofer instances
communicate with their respective sentry using the 9P protocol. For a more detailed
+4 -2
View File
@@ -1,7 +1,9 @@
# Installation
-> Note: gVisor supports only x86\_64 and requires Linux 4.14.77+
-> ([older Linux](./networking.md#gso)).
[TOC]
> Note: gVisor supports only x86\_64 and requires Linux 4.14.77+
> ([older Linux](./networking.md#gso)).
## Versions
+2
View File
@@ -1,5 +1,7 @@
# Networking
[TOC]
gVisor implements its own network stack called [netstack][netstack]. All aspects
of the network stack are handled inside the Sentry — including TCP connection
state, control messages, and packet assembly — keeping it isolated from the host
+2
View File
@@ -1,5 +1,7 @@
# Platforms (KVM)
[TOC]
This document will help you set up your system to use a different gVisor
platform.
+8 -1
View File
@@ -130,7 +130,14 @@ layout: {layout}"""
builder_content += [header.format(**args)]
builder_content += ["---"]
builder_content += ["EOF"]
builder_content += ["grep -v -E '^# ' %s >>$T/%s || true" % (f.path, f.short_path)]
# To generate the final page, we need to strip out the title (which
# was pulled above to generate the annotation in the frontmatter,
# and substitute the [TOC] tag with the {% toc %} plugin tag. Note
# that the pipeline here is almost important, as the grep will
# return non-zero if the file is empty, but we ignore that within
# the pipeline.
builder_content += ["grep -v -E '^# ' %s | sed -e 's|^\\[TOC\\]$|- TOC\\n{:toc}|' >>$T/%s" % (f.path, f.short_path)]
builder_content += ["declare -r filename=$(readlink -m %s)" % tarball.path]
builder_content += ["(cd $T && tar -zcf \"${filename}\" .)\n"]