Skip to content

Commit dea5c31

Browse files
committed
Stop using git to build the __doc__ dependency
Ref: rust-lang/cargo#2808 Reverts: 31e1e7e
1 parent 31e1e7e commit dea5c31

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

docker/Dockerfile

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,22 @@ ENV CARGO_INSTALL_ROOT="/workdir"
1010
# Newer rust needed due to let...else feature
1111
RUN apk add --no-cache --repository=https://dl-cdn.alpinelinux.org/alpine/edge/community rust cargo
1212

13-
RUN apk --no-cache add musl-dev git
13+
RUN apk --no-cache add musl-dev
1414

1515
ADD https://github.com/RustPython/RustPython/archive/refs/tags/v$RUST_PYTHON_VERSION.tar.gz /tmp/v$RUST_PYTHON_VERSION.tar.gz
16+
ADD https://github.com/RustPython/__doc__/archive/d927debd491e4c45b88e953e6e50e4718e0f2965.tar.gz /tmp/rp__doc__.tar.gz
17+
18+
RUN mkdir /workdir/rp__doc__/ && tar --strip-components=1 -C /workdir/rp__doc__/ -xzf /tmp/rp__doc__.tar.gz
1619

1720
RUN tar --strip-components=1 -C /workdir -xzf /tmp/v$RUST_PYTHON_VERSION.tar.gz
1821

19-
RUN cargo fetch --locked
22+
# Remove the git mode that triggers an error on armv6 and armv7
23+
# Ref: https://github.com/rust-lang/cargo/issues/2808 (failed to mmap. Could not write data: Out of memory; class=Os (2))
24+
RUN sed -i 's#{ git = .*#{ path = "/workdir/rp__doc__/" }#' /workdir/derive-impl/Cargo.toml
25+
26+
RUN cargo fetch
2027

21-
RUN cargo build --features freeze-stdlib --release --locked --offline --bin rustpython
28+
RUN uname -m && cargo build --features freeze-stdlib --release --locked --offline --bin rustpython
2229

2330
FROM alpine:3.17
2431

0 commit comments

Comments
 (0)