-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
37 lines (24 loc) · 927 Bytes
/
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
# Consider compiling the cairo programs before building the image to embed them.
FROM rust:alpine AS build
RUN apk add --update alpine-sdk linux-headers libressl-dev tini
WORKDIR /src
COPY ./rust-toolchain.toml /src/
# Cache Docker layer for nightly toolchain installation
RUN cargo --version
COPY . /src/
RUN --mount=type=cache,target=/usr/local/cargo/registry \
--mount=type=cache,target=/usr/local/cargo/git \
--mount=type=cache,target=/src/target \
cargo build --release
RUN --mount=type=cache,target=/src/target \
mkdir ./build && \
cp ./target/release/saya ./build/
FROM alpine
LABEL org.opencontainers.image.source=https://github.com/dojoengine/saya
COPY --from=build /sbin/tini /tini
ENTRYPOINT ["/tini", "--"]
COPY --from=build /src/build/saya /usr/bin/
COPY programs /programs
ENV SNOS_PROGRAM=/programs/snos.json
ENV LAYOUT_BRIDGE_PROGRAM=/programs/layout_bridge.json
CMD [ "saya" ]