Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/google/docsy.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeri Ochoa <gerino@google.com>2022-06-13 14:08:37 +0300
committerGitHub <noreply@github.com>2022-06-13 14:08:37 +0300
commit436ae8700eeb7ea63278b9d1a410ea03d32bf156 (patch)
treed52596a332bba52a07881c7d0e318c21aba08f98 /Dockerfile
parenta0852ca57a8fb61c3e40cd898305179342b8364f (diff)
Add Docker to run docsy user guide locally (#1016)
Add support to run the docsy website server locally inside a container. With support for both `docker` and `docker-compose`. The folder is mounted as a shared volume, allowing changes to be picked up by the container. The `node_modules` folder is kept in a volume, to avoid surfacing those files in the host folder. The documentation explains how to run the container as the host user, so you don't end up with files like `package.json` and `.hugo-build.lock` owned by root on the host os. Co-authored-by: LisaFC <lcarey@google.com>
Diffstat (limited to 'Dockerfile')
-rw-r--r--Dockerfile9
1 files changed, 9 insertions, 0 deletions
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..54b4a7a
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,9 @@
+FROM klakegg/hugo:0.95.0-ext-alpine as docsy-user-guide
+
+RUN apk update
+RUN apk add git
+COPY package.json /app/docsy/userguide/
+WORKDIR /app/docsy/userguide/
+RUN npm install --production=false
+
+CMD ["serve", "--cleanDestinationDir", "--themesDir ../..", "--baseURL http://localhost:1313/", "--buildDrafts", "--buildFuture", "--disableFastRender", "--ignoreCache", "--watch"]