File tree Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Expand file tree Collapse file tree 2 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 1
- ARG WATTSI_VERSION
2
- FROM whatwg/wattsi:${WATTSI_VERSION} as wattsi-stage
3
-
4
1
FROM debian:stable-slim
5
2
RUN apt-get update && \
6
3
apt-get install --yes --no-install-recommends ca-certificates curl git python3 python3-pip && \
7
4
rm -rf /var/lib/apt/lists/*
8
5
9
- COPY --from=wattsi-stage /whatwg/wattsi/bin/wattsi /bin/wattsi
6
+ COPY --from=whatwg/ wattsi:latest /whatwg/wattsi/bin/wattsi /bin/wattsi
10
7
11
8
RUN pip3 install bs-highlighter
12
9
Original file line number Diff line number Diff line change @@ -7,7 +7,9 @@ set -o pipefail
7
7
cd " $( dirname " $0 " ) "
8
8
DIR=$( pwd)
9
9
10
- # The latest required version of Wattsi. Update this if you change how ./build.sh invokes Wattsi.
10
+ # The latest required version of Wattsi. Update this if you change how ./build.sh invokes Wattsi;
11
+ # it will cause a warning if Wattsi's self-reported version is lower. Note that there's no need to
12
+ # update this on every revision of Wattsi; only do so when a warning is justified.
11
13
WATTSI_LATEST=108
12
14
13
15
# Shared state variables throughout this script
@@ -437,9 +439,16 @@ function relativePath {
437
439
# Arguments: none
438
440
# Output: A web server with the build output will be running inside the Docker container
439
441
function doDockerBuild {
440
- DOCKER_BUILD_ARGS=( --tag whatwg-html --build-arg " WATTSI_VERSION=$WATTSI_LATEST " )
442
+ # Ensure whatwg/wattsi:latest is up to date. Without this, the locally cached copy would be used,
443
+ # i.e. once Wattsi was downloaded once, it would never update. Note that this is fast
444
+ # (zero-transfer) if the locally cached copy is already up to date.
445
+ DOCKER_PULL_ARGS=()
446
+ $QUIET && DOCKER_PULL_ARGS+=( --quiet )
447
+ DOCKER_PULL_ARGS+=( whatwg/wattsi:latest )
448
+ docker pull " ${DOCKER_PULL_ARGS[@]} "
449
+
450
+ DOCKER_BUILD_ARGS=( --tag whatwg-html )
441
451
$QUIET && DOCKER_BUILD_ARGS+=( --quiet )
442
-
443
452
docker build " ${DOCKER_BUILD_ARGS[@]} " .
444
453
445
454
DOCKER_RUN_ARGS=()
You can’t perform that action at this time.
0 commit comments