summaryrefslogtreecommitdiffhomepage
path: root/website/Dockerfile
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-11-18 13:40:27 -0800
committerAdin Scannell <ascannell@google.com>2020-04-21 12:00:59 -0700
commit957e26a6f30d40e2bff042d76a327d0a2cfbabae (patch)
tree3e95d46355585ae4661de5cef30cdca72a7c94bb /website/Dockerfile
parentdc2f198866c5fd8162a79978eb3633975d3ba11f (diff)
Move website to a simpler jekyll-based template
This will allow us to merge the site into the main repository. This merge allows the documentation to be kept up-to-date and synchronized with the main project. Builds will be triggered on any update, removing the need for the cron-based reploy.
Diffstat (limited to 'website/Dockerfile')
-rw-r--r--website/Dockerfile29
1 files changed, 29 insertions, 0 deletions
diff --git a/website/Dockerfile b/website/Dockerfile
new file mode 100644
index 000000000..0451c554e
--- /dev/null
+++ b/website/Dockerfile
@@ -0,0 +1,29 @@
+# Copyright 2019 Google LLC
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+# Build the system call doc generator.
+FROM gcr.io/cloud-builders/go as syscalls
+WORKDIR /src
+COPY go.mod go.sum /src/
+COPY cmd/generate-syscall-docs /src/cmd/generate-syscall-docs
+RUN CGO_ENABLED=0 go build -o /bin/generate-syscall-docs gvisor.dev/website/cmd/generate-syscall-docs
+
+# Generate the static site.
+FROM jekyll/jekyll as jekyll
+USER root
+WORKDIR /site
+RUN gem install html-proofer:3.10.2 nokogiri:1.10.1
+RUN gem install jekyll-autoprefixer webrick jekyll-inline-svg
+COPY --from=syscalls /bin/generate-syscall-docs /bin/generate-syscall-docs
+CMD ["sh", "-c", "cat syscalls.json | /bin/generate-syscall-docs -out content/docs/user_guide/compatibility/ && jekyll build -t -s content -d _site && cp -a static/* _site && (cd _site && /usr/gem/bin/htmlproofer --disable-external --check-html .)"]