File tree Expand file tree Collapse file tree 7 files changed +19
-11
lines changed Expand file tree Collapse file tree 7 files changed +19
-11
lines changed Original file line number Diff line number Diff line change 11FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
22WORKDIR /opt/build
3+ RUN rustup target add wasm32-wasip1
34COPY . .
4- RUN rustup target add wasm32-wasip1 && cargo build --target wasm32-wasip1 --release
5+ RUN cargo build --target wasm32-wasip1 --release
56
67FROM scratch
78COPY --from=build /opt/build/spin.toml ./spin.toml
Original file line number Diff line number Diff line change 11FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
22WORKDIR /opt/build
3+ RUN rustup target add wasm32-wasip1
34COPY . .
4- RUN rustup target add wasm32-wasip1 && cargo build --target wasm32-wasip1 --release
5+ RUN cargo build --target wasm32-wasip1 --release
56
67FROM scratch
78COPY --from=build /opt/build/target/wasm32-wasip1/release/mqtt_message_logger.wasm ./target/wasm32-wasip1/release/mqtt_message_logger.wasm
Original file line number Diff line number Diff line change 11FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
22WORKDIR /opt/build
3- COPY . .
43RUN rustup target add wasm32-wasip1
4+ COPY . .
55
66WORKDIR /opt/build/spin-http-trigger
77RUN cargo build --target wasm32-wasip1 --release
Original file line number Diff line number Diff line change 11FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
22WORKDIR /opt/build
3+ RUN rustup target add wasm32-wasip1
34COPY . .
4- RUN rustup target add wasm32-wasip1 && cargo build --target wasm32-wasip1 --release
5+ RUN cargo build --target wasm32-wasip1 --release
56
67FROM scratch
78COPY --from=build /opt/build/target/wasm32-wasip1/release/spin_redis_trigger.wasm ./target/wasm32-wasip1/release/spin_redis_trigger.wasm
Original file line number Diff line number Diff line change 11FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
22WORKDIR /opt/build
3+ RUN rustup target add wasm32-wasip1
34COPY . .
4- RUN rustup target add wasm32-wasip1 && cargo build --target wasm32-wasip1 --release
5+ RUN cargo build --target wasm32-wasip1 --release
56
67FROM scratch
78COPY --from=build /opt/build/target/wasm32-wasip1/release/spin_outbound_redis.wasm ./target/wasm32-wasip1/release/spin_outbound_redis.wasm
Original file line number Diff line number Diff line change 11FROM --platform=${BUILDPLATFORM} rust:1.85 AS build
22WORKDIR /opt/build
3+ RUN rustup target add wasm32-wasip1
34COPY . .
4- RUN rustup target add wasm32-wasip1 && cargo build --target wasm32-wasip1 --release
5+ RUN cargo build --target wasm32-wasip1 --release
56
67FROM --platform=linux/amd64 golang:1.23.2-bullseye AS build-go
78WORKDIR /opt/build
8- COPY . .
99RUN curl -LO https://github.com/tinygo-org/tinygo/releases/download/v0.34.0/tinygo_0.34.0_amd64.deb && dpkg -i tinygo_0.34.0_amd64.deb
10- RUN cd go-hello && tinygo build -target=wasi -o spin_go_hello.wasm main.go
10+ COPY . .
11+ WORKDIR /opt/build/go-hello
12+ RUN if [ -f go.mod ]; then go mod download; fi
13+ RUN tinygo build -target=wasi -o spin_go_hello.wasm main.go
1114
1215FROM scratch
1316COPY --from=build /opt/build/target/wasm32-wasip1/release/spin_rust_hello.wasm ./target/wasm32-wasip1/release/spin_rust_hello.wasm
Original file line number Diff line number Diff line change 11FROM --platform=${BUILDPLATFORM} mcr.microsoft.com/dotnet/sdk:7.0-bullseye-slim-amd64 AS build
22WORKDIR /opt/build
3- COPY . .
43RUN apt-get update && apt-get install xz-utils
54RUN curl -LO https://github.com/bytecodealliance/wizer/releases/download/dev/wizer-dev-x86_64-linux.tar.xz \
65 && tar -xvf wizer-dev-x86_64-linux.tar.xz \
76 && rm wizer-dev-x86_64-linux.tar.xz \
87 && install wizer-dev-x86_64-linux/wizer /usr/local/bin
98
9+ FROM build AS build-dotnet
10+ COPY . .
1011RUN dotnet build -c Release
1112
1213FROM scratch
13- COPY --from=build /opt/build/bin/Release/net7.0/MyTestProject.wasm ./bin/Release/net7.0/MyTestProject.wasm
14- COPY --from=build /opt/build/spin.toml .
14+ COPY --from=build-dotnet /opt/build/bin/Release/net7.0/MyTestProject.wasm ./bin/Release/net7.0/MyTestProject.wasm
15+ COPY --from=build-dotnet /opt/build/spin.toml .
You can’t perform that action at this time.
0 commit comments