-
Notifications
You must be signed in to change notification settings - Fork 123
/
Dockerfile
50 lines (41 loc) · 1.75 KB
/
Dockerfile
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
# Below version includes rust 1.76.0
ARG RUST_IMAGE_VERSION=@sha256:2a6147ed8a879621f27d2c7a966868de438801084a276498b3a937e326ef7f65
# If you want to use latest version then uncomment next line
# ARG RUST_IMAGE_VERSION=:slim-bullseye
# Alternatively you can build docker with argument: --build-arg="RUST_IMAGE_VERSION=:slim-bullseye"
FROM rust${RUST_IMAGE_VERSION} as base-image
RUN apt update && apt install -y \
cmake=3.18.4-2+deb11u1 \
clang=1:11.0-51+nmu5 \
build-essential=12.9 \
llvm=1:11.0-51+nmu5
FROM base-image as builder
# Copy library crates
ADD Cargo.toml /app/Cargo.toml
ADD radix-blueprint-schema-init /app/radix-blueprint-schema-init
ADD radix-common /app/radix-common
ADD radix-common-derive /app/radix-common-derive
ADD radix-engine /app/radix-engine
ADD radix-engine-interface /app/radix-engine-interface
ADD radix-engine-profiling /app/radix-engine-profiling
ADD radix-engine-profiling-derive /app/radix-engine-profiling-derive
ADD radix-native-sdk /app/radix-native-sdk
ADD radix-rust app/radix-rust
ADD radix-sbor-derive /app/radix-sbor-derive
ADD radix-substate-store-impls /app/radix-substate-store-impls
ADD radix-substate-store-interface /app/radix-substate-store-interface
ADD radix-substate-store-queries /app/radix-substate-store-queries
ADD radix-transactions /app/radix-transactions
ADD sbor /app/sbor
ADD sbor-derive /app/sbor-derive
ADD sbor-derive-common /app/sbor-derive-common
ADD scrypto-compiler /app/scrypto-compiler
# Copy radix-clis crate
ADD radix-clis /app/radix-clis
WORKDIR /app
RUN cargo install --path ./radix-clis
FROM base-image
COPY --from=builder /app/radix-clis/target/release/scrypto /usr/local/bin/scrypto
RUN rustup target add wasm32-unknown-unknown
WORKDIR /src
ENTRYPOINT ["scrypto", "build", "--path", "/src"]