-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdockerfile.api
More file actions
28 lines (21 loc) · 715 Bytes
/
Copy pathdockerfile.api
File metadata and controls
28 lines (21 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
FROM --platform=$BUILDPLATFORM debian:trixie-slim as builder
ARG DEBIAN_FRONTEND=noninteractive
RUN apt-get update --fix-missing \
&& apt-get install -y --no-install-recommends \
build-essential \
ca-certificates \
curl \
git \
&& apt-get clean
RUN curl -fsSL https://developer.fermyon.com/downloads/install.sh | bash -s -- -v v2.0.1
RUN curl -sSf https://sh.rustup.rs | bash -s -- -y
ENV PATH="/root/.cargo/bin:${PATH}"
RUN rustup target add wasm32-wasi
COPY api /api
WORKDIR /api
RUN /spin build
# ----------
FROM scratch
COPY --from=builder /api/spin.toml /spin.toml
COPY --from=builder /api/target/wasm32-wasi/release/api.wasm /target/wasm32-wasi/release/api.wasm
ENTRYPOINT [ "/spin.toml" ]