@@ -554,6 +554,40 @@ extensions for your code editor. The
554
554
[`.prettierrc`](https://github.com/explosion/spaCy/tree/master/website/.prettierrc)
555
555
file in the root defines the settings used in this codebase.
556
556
557
+ ## Building & Developing the Site with Docker {#docker}
558
+ Sometimes it's hard to get a local environment working due to rapid updates to node dependencies,
559
+ so it may be easier to use docker for building the docs.
560
+
561
+ If you'd like to do this,
562
+ **be sure you do *not* include your local `node_modules` folder**,
563
+ since there are some dependencies that need to be built for the image system.
564
+ Rename it before using.
565
+
566
+ ```bash
567
+ docker run -it \
568
+ -v $(pwd):/spacy-io/website \
569
+ -p 8000:8000 \
570
+ ghcr.io/explosion/spacy-io \
571
+ gatsby develop -H 0.0.0.0
572
+ ```
573
+
574
+ This will allow you to access the built website at http://0.0.0.0:8000/
575
+ in your browser, and still edit code in your editor while having the site
576
+ reflect those changes.
577
+
578
+ **Note**: On M1 Macs you may need to the image tagged `arm64` (`ghcr.io/explosion/spacy-io:arm64`),
579
+ otherwise you'll see `qemu` segfault during the build.
580
+
581
+ ### Building the Docker Image {#docker-build}
582
+
583
+ If you'd like to build the image locally, you can do so like this:
584
+
585
+ ```bash
586
+ docker build -t spacy-io .
587
+ ```
588
+
589
+ This will take some time, so if you want to use the prebuilt image you'll save a bit of time.
590
+
557
591
## Markdown reference {#markdown}
558
592
559
593
All page content and page meta lives in the `.md` files in the `/docs`
0 commit comments