diff --git a/docs/Dockerfile b/docs/Dockerfile index a9dbb109..7a82e49b 100644 --- a/docs/Dockerfile +++ b/docs/Dockerfile @@ -7,12 +7,19 @@ ENV VERSION=$version COPY requirements.txt /requirements.txt COPY . /docs -RUN apk add --no-cache --virtual .build-deps \ - gcc musl-dev \ - && pip3 install -r /requirements.txt \ - && mkdir -p /build/$VERSION \ - && sphinx-build -W /docs /build/$VERSION \ - && apk del .build-deps +RUN set -euxo pipefail \ + ; deps="gcc musl-dev" \ + ; [[ "${machine}" != x86_64 ]] && \ + deps="${deps} cargo" \ + ; apk add --no-cache --virtual .build-deps ${deps} \ + ; [[ "${machine}" == armv7* ]] && \ + mkdir -p /root/.cargo/registry/index && \ + git clone --bare https://github.com/rust-lang/crates.io-index.git /root/.cargo/registry/index/github.com-1285ae84e5963aae \ + ; pip3 install -r /requirements.txt \ + ; mkdir -p /build/$VERSION \ + ; sphinx-build -W /docs /build/$VERSION \ + ; apk del .build-deps \ + ; rm -rf /root/.cargo # Build nginx deployment image including generated html