Skip to content

Commit

Permalink
Merge pull request #79 from Marsman1996/docker
Browse files Browse the repository at this point in the history
Fix Dockerfile
  • Loading branch information
hxuhack authored Dec 2, 2024
2 parents d7e8018 + 0aafb77 commit 750f6fd
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
12 changes: 1 addition & 11 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,4 @@ WORKDIR /app

RUN git clone https://github.com/Artisan-Lab/RAP.git .

WORKDIR /app/rap

RUN git submodule update --init --recursive; \
cp ./config.toml ./rust/

WORKDIR /app/rap/rust

RUN ./x.py build --stage 2 compiler/rustc; \
rustup toolchain link stage2 build/${HOST_TRIPLE}/stage2; \

ENTRYPOINT ["top", "-b"]
RUN ./install.sh
7 changes: 7 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

set -e

# Define color variables
BLUE='\033[0;34m'
GREEN='\033[0;32m'
Expand Down Expand Up @@ -31,6 +33,11 @@ if [ ! -f "$toolchain_file" ]; then
exit 1
fi

if ! rustup toolchain install "$toolchain_date" --profile minimal --component rustc-dev,rust-src,llvm-tools-preview; then
printf "%bError: Failed to install toolchain %s.%b\n" "${RED}" "$toolchain_date" "${NC}"
exit 1
fi

os_type=$(uname -s)
arch_type=$(uname -m)

Expand Down

0 comments on commit 750f6fd

Please sign in to comment.