Skip to content

Commit ce0b404

Browse files
committed
build: make dockerfile build again
1 parent c5245dc commit ce0b404

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

Dockerfile

Lines changed: 19 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
1-
FROM ghcr.io/navigraph/cargo-msfs-bin:latest AS base
1+
FROM rust:1.84
22

3-
RUN apt-get update
4-
RUN apt install git -y
3+
# Install needed packages and clean up
4+
RUN apt update && \
5+
apt install -y --no-install-recommends lsb-release wget software-properties-common gnupg gcc-multilib && \
6+
rm -rf /var/lib/apt/lists/*
57

6-
RUN cargo-msfs install msfs2020
7-
RUN cargo-msfs install msfs2024
8+
# Install clang and clean up
9+
RUN wget https://apt.llvm.org/llvm.sh && \
10+
chmod +x llvm.sh && \
11+
./llvm.sh 17 && \
12+
ln -s $(which clang-17) /usr/bin/clang && \
13+
ln -s $(which llvm-ar-17) /usr/bin/llvm-ar && \
14+
rm llvm.sh
815

9-
FROM base AS builder
16+
# Install rust target
17+
RUN rustup target install wasm32-wasip1
1018

11-
WORKDIR /external
19+
# Install cargo-msfs
20+
RUN cargo install --git https://github.com/navigraph/cargo-msfs
1221

13-
14-
15-
COPY . .
22+
# Install MSFS2020 and MSFS2024 SDK
23+
RUN cargo-msfs install msfs2020 && \
24+
cargo-msfs install msfs2024

scripts/run_docker_cmd.bat

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ set image="local"
44

55
cd %~dp0
66

7-
docker run --rm -it -v "%cd%\..\:/external" %image% %*
7+
docker run --rm -it -v "%cd%\..\:/external" -w /external %image% %*

scripts/run_docker_cmd.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ cd "$(dirname "$0")"
66

77
echo "Running $@ in docker"
88

9-
docker run --rm -v "$(pwd)/../:/external" $IMAGE "$@"
9+
docker run --rm -v "$(pwd)/../:/external" -w /external $IMAGE "$@"

0 commit comments

Comments
 (0)