You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve local Dockerfile (and remove its HTTP server)
This changes the Docker-mediated build (i.e. build.sh --docker) to behave the same as the non-Docker-mediated version. In particular, it:
* Operates on local input/cache/output directories, instead of copying the input into the container every build, and managing cache and output entirely within the container
* No longer creates and exposes a HTTP server, since the output is written directly to the disk (outside the container)
* Respects all command-line options, including --no-update
Other improvements:
* Changes the strategy for clearing directories, since deleting the directory was causing some problems in my local testing
* Slims down the size of the Docker container significantly, by using debian:stable-slim, copying less of html-build in, and no longer copying the source directory in repeatedly
* Does not bother checking for local Wattsi/highlighter if we're going the Docker route
Copy file name to clipboardExpand all lines: README.md
+7-22Lines changed: 7 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -34,28 +34,9 @@ Run the `build.sh` script from inside your `html-build` working directory, like
34
34
35
35
The first time this runs, it will ask for your input on where to clone the HTML source from, or where on your system to find it if you've already done that. If you're working to submit a pull request to [whatwg/html](https://github.com/whatwg/html), be sure to give it the URL of your fork.
36
36
37
-
### Output
38
-
39
-
After you complete the build steps above, the build will run and generate the single-page version of the spec, the multipage version, and more. If all goes well, you should very soon have all the following in your `output/` directory:
40
-
41
-
-`404.html`
42
-
-`demos/*`
43
-
-`dev/*`
44
-
-`entities.json`
45
-
-`fonts/*`
46
-
-`html-dfn.js`
47
-
-`images/*`
48
-
-`index.html`
49
-
-`link-fixup.js`
50
-
-`multipage/*`
51
-
-`robots.txt`
52
-
-`xrefs.json`
53
-
54
-
Now you're ready to edit the `html/source` file—and after you make your changes, you can run the `build.sh` script again to see the new output.
55
-
56
37
## Building using a Docker container
57
38
58
-
The Dockerized version of the build allows you to run the build entirely inside a "container" (lightweight virtual machine). This includes tricky dependencies like a local copy of Wattsi, as well an HTTP server setup similar to that of https://html.spec.whatwg.org.
39
+
The Dockerized version of the build allows you to run the build entirely inside a "container" (lightweight virtual machine). This includes tricky dependencies like a local copy of Wattsi and Python.
59
40
60
41
To perform a Dockerized build, use the `--docker` flag:
61
42
@@ -65,9 +46,13 @@ To perform a Dockerized build, use the `--docker` flag:
65
46
66
47
The first time you do this, Docker will download a bunch of stuff to set up the container properly, but subsequent runs will simply build the standard and be very fast.
67
48
68
-
After building the standard, this will launch a HTTP server that allows you to view the result at `http://localhost:8080`. (OS X and Windows users will need to use the IP address of their docker-machine VM instead of `localhost`. You can get this with the `docker-machine env` command.)
49
+
If you get permissions errors on Windows, you need to first [configure](https://docs.docker.com/docker-for-windows/#file-sharing) your `html-build/` and `html/` directories to be shareable with Docker.
69
50
70
-
Note that due to the way Docker works, the HTML source repository must be contained in a subdirectory of the `html-build` working directory. This will happen automatically if you let `build.sh` clone for you, but if you have a preexisting clone you'll need to move it.
51
+
## Output
52
+
53
+
After you complete the build steps above, the build will run and generate the single-page version of the spec, the multipage version, and more. If all goes well, you should very soon have an `output/` directory containing important files like `index.html`, `multipage/`, and `dev/`.
54
+
55
+
Now you're ready to edit the `html/source` file—and after you make your changes, you can run the `build.sh` script again to see the new output.
0 commit comments