Skip to content

Commit

Permalink
Fix non-working Dockerfile for build process
Browse files Browse the repository at this point in the history
Details:
- Initialized git submodules in binaryen installation process.
- Altered Rust installation to use the version specified in ./rust-toolchain, instead of the default stable version.
- Installed additional components and target using ./rust-toolchain version.
- Removed rust-toolchain after installation to maintain a clean working directory.
  • Loading branch information
José Luis Landabaso Díaz committed Jul 25, 2023
1 parent 94c8e80 commit 02a4c23
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ RUN curl -sSf https://apt.llvm.org/llvm.sh | bash -s -- 12 && \
# Install wasm-opt from binaryen
RUN git clone --depth 1 --branch version_114 https://github.com/WebAssembly/binaryen.git /binaryen && \
cd /binaryen && \
git submodule update --init && \
cmake . && \
make -j$(nproc) && \
make install && \
Expand All @@ -50,11 +51,15 @@ RUN git clone --depth 1 --branch version_114 https://github.com/WebAssembly/bina
RUN useradd -ms /bin/bash builduser
USER builduser

# Install Rust stable
# Install Rust (using ./rust-toolchain version)
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | bash -s -- -y \
--default-toolchain stable \
--profile minimal \
--component clippy,rustfmt,rust-src \
--target wasm32-unknown-unknown
--profile minimal
# Install additional components and target (using ./rust-toolchain version)
WORKDIR /home/builduser/
COPY rust-toolchain .
ENV PATH=/home/builduser/.cargo/bin:$PATH
RUN rustup component add clippy rustfmt rust-src
RUN rustup target add wasm32-unknown-unknown
RUN rm rust-toolchain

CMD Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 & export DISPLAY=':99.0' && bash

0 comments on commit 02a4c23

Please sign in to comment.