Skip to content

Commit e39fee7

Browse files
committed
Rearrange commands in Dockerfile, for better layer caching
1 parent 0aacce8 commit e39fee7

File tree

2 files changed

+12
-13
lines changed

2 files changed

+12
-13
lines changed

Dockerfile

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,21 +5,8 @@ LABEL maintainer="OpenGG <[email protected]>"
55
# Compiling Rust to Wasm with the LLVM wasm-backend (without Emscripten)
66
# https://gist.github.com/LukasKalbertodt/821ab8b85a25f4c54544cc43bed2c39f
77

8-
# enviroment
9-
ENV PATH /root/.cargo/bin:/rust-wasm-bin/llvm/bin:/rust-wasm-bin/binaryen/bin:${PATH}
10-
11-
# working directory of container
12-
VOLUME ["/work"]
13-
WORKDIR /work
14-
15-
# entrypoint script
16-
ENTRYPOINT [ "rust-wasm.sh" ]
17-
18-
ADD "rust-wasm.sh" /usr/local/bin/
19-
208
# install deps
219
RUN cd / \
22-
&& chmod +x /usr/local/bin/rust-wasm.sh \
2310
# apt source
2411
# && sed -i "s|deb.debian.org|mirrors.ustc.edu.cn|" /etc/apt/sources.list \
2512
# && sed -i "s|security.debian.org|mirrors.ustc.edu.cn/debian-security|" /etc/apt/sources.list \
@@ -54,3 +41,15 @@ RUN cd / \
5441
&& apt-get autoclean -y \
5542
&& apt-get clean -y \
5643
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /rust-wasm
44+
45+
# enviroment
46+
ENV PATH /root/.cargo/bin:/rust-wasm-bin/llvm/bin:/rust-wasm-bin/binaryen/bin:${PATH}
47+
48+
# working directory of container
49+
VOLUME ["/work"]
50+
WORKDIR /work
51+
52+
# entrypoint script
53+
ENTRYPOINT [ "rust-wasm.sh" ]
54+
55+
ADD "rust-wasm.sh" /usr/local/bin/

rust-wasm.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)