File tree Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Expand file tree Collapse file tree 1 file changed +11
-4
lines changed Original file line number Diff line number Diff line change 1
1
# Use a base image that supports multi-arch
2
+ FROM rust:bookworm AS builder
3
+
4
+ WORKDIR /usr/src/app
5
+ COPY . .
6
+
7
+ RUN cargo build -p spacetimedb-standalone -p spacetimedb-cli --release --locked
8
+
2
9
FROM rust:bookworm
3
10
4
11
# Install dependencies
@@ -30,14 +37,14 @@ RUN dotnet workload install wasi-experimental
30
37
# Install Rust WASM target
31
38
RUN rustup target add wasm32-unknown-unknown
32
39
40
+ # Copy over SpacetimeDB
41
+ COPY --from=builder --chmod=755 /usr/src/app/target/release/spacetimedb-standalone /usr/src/app/target/release/spacetimedb-cli /opt/spacetime/
42
+ RUN ln -s /opt/spacetime/spacetimedb-cli /usr/local/bin/spacetime
43
+
33
44
# Create and switch to a non-root user
34
45
RUN useradd -m spacetime
35
46
USER spacetime
36
47
37
- # Install SpacetimeDB
38
- RUN curl -sSfL https://install.spacetimedb.com | bash -s -- --yes
39
- ENV PATH="/home/spacetime/.local/bin:${PATH}"
40
-
41
48
# Set working directory
42
49
WORKDIR /app
43
50
You can’t perform that action at this time.
0 commit comments