File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ FROM node:11.15.0
2+
3+ WORKDIR /thinc-io
4+
5+ RUN npm install -g
[email protected] 6+
7+ COPY package.json .
8+ COPY package-lock.json .
9+
10+ RUN npm install
11+
12+ # This is so the installed node_modules will be up one directory
13+ # from where a user mounts files, so that they don't accidentally mount
14+ # their own node_modules from a different build
15+ # https://nodejs.org/api/modules.html#modules_loading_from_node_modules_folders
16+ WORKDIR /thinc-io/website/
Original file line number Diff line number Diff line change @@ -14,6 +14,30 @@ npm run dev # start dev server
1414A ` .prettierrc ` is included in the repo, so if you set up auto-formatting with
1515Prettier, it should match the style.
1616
17+ ## Build and run the website in a Docker container
18+
19+ Rather than installing NPM locally, you can also build a Docker container with
20+ the prerequisite dependencies:
21+
22+ ``` bash
23+ docker build -t thinc-io .
24+ ```
25+
26+ Afterwards, the website can be built and run in the container:
27+
28+ ``` bash
29+ docker run --rm -it \
30+ -v $PWD :/thinc-io/website \
31+ -p 8000:8000 \
32+ thinc-io \
33+ gatsby develop -H 0.0.0.0
34+ ```
35+
36+ This is currently the only way to build the website on ARM64 Macs, since the
37+ required Node.js version is not built for macOS/ARM64.
38+
39+ These commands also work with Podman by replacing ` docker ` by ` podman ` .
40+
1741## Directory structure
1842
1943- ` /docs ` : Docs pages as Markdown.
You can’t perform that action at this time.
0 commit comments