File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -4,10 +4,18 @@ FROM rust:1.51.0
4
4
# setup rust with Wasm support
5
5
RUN rustup target add wasm32-unknown-unknown
6
6
7
- # Install sccache from https://crates.io/crates/sccache
8
- # This is slow due to full release compilation from source.
9
- # Use full version string here to ensure Docker caching works well.
10
- RUN cargo install --version 0.2.15 sccache
7
+ # Download sccache and verify checksum
8
+ ADD https://github.com/mozilla/sccache/releases/download/v0.2.15/sccache-v0.2.15-x86_64-unknown-linux-musl.tar.gz /tmp/sccache.tar.gz
9
+ RUN sha256sum /tmp/sccache.tar.gz | grep e5d03a9aa3b9fac7e490391bbe22d4f42c840d31ef9eaf127a03101930cbb7ca
10
+
11
+ # Extract and install sccache
12
+ RUN tar -xf /tmp/sccache.tar.gz
13
+ RUN mv sccache-v*/sccache /usr/local/bin/sccache
14
+ RUN chmod +x /usr/local/bin/sccache
15
+ RUN rm -rf sccache-v*/ /tmp/sccache.tar.gz
16
+
17
+ # Check sccache version
18
+ RUN sccache --version
11
19
12
20
# Download binaryen and verify checksum
13
21
ADD https://github.com/WebAssembly/binaryen/releases/download/version_96/binaryen-version_96-x86_64-linux.tar.gz /tmp/binaryen.tar.gz
@@ -16,6 +24,7 @@ RUN sha256sum /tmp/binaryen.tar.gz | grep 9f8397a12931df577b244a27c293d7c976bc7e
16
24
# Extract and install wasm-opt
17
25
RUN tar -xf /tmp/binaryen.tar.gz --wildcards '*/wasm-opt'
18
26
RUN mv binaryen-version_*/wasm-opt /usr/local/bin
27
+ RUN rm -rf binaryen-version_*/ /tmp/binaryen.tar.gz
19
28
20
29
# Check wasm-opt version
21
30
RUN wasm-opt --version
Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ RUN sha256sum /tmp/binaryen.tar.gz | grep 9f8397a12931df577b244a27c293d7c976bc7e
23
23
# Extract and install wasm-opt
24
24
RUN tar -xf /tmp/binaryen.tar.gz --wildcards '*/wasm-opt'
25
25
RUN mv binaryen-version_*/wasm-opt /usr/local/bin
26
+ RUN rm -rf binaryen-version_*/ /tmp/binaryen.tar.gz
26
27
27
28
# Check wasm-opt version
28
29
RUN wasm-opt --version
You can’t perform that action at this time.
0 commit comments