diff options
author | Geri Ochoa <gerino@google.com> | 2022-06-13 14:08:37 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-13 14:08:37 +0300 |
commit | 436ae8700eeb7ea63278b9d1a410ea03d32bf156 (patch) | |
tree | d52596a332bba52a07881c7d0e318c21aba08f98 /Dockerfile | |
parent | a0852ca57a8fb61c3e40cd898305179342b8364f (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-- | Dockerfile | 9 |
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"] |