Fix variable expansion

This commit is contained in:
Riordan Panayides 2023-01-13 19:31:30 +00:00 committed by aniketfuryrocks
parent e183ed96d5
commit 50595ad824
1 changed files with 23 additions and 0 deletions

23
Dockerfile Normal file
View File

@ -0,0 +1,23 @@
# syntax = docker/dockerfile:1.2
FROM rust:1.65.0 as base
RUN cargo install cargo-chef
RUN rustup component add rustfmt
RUN apt-get update && apt-get install -y clang cmake ssh
WORKDIR /app
FROM base AS plan
COPY . .
WORKDIR /app
RUN cargo chef prepare --recipe-path recipe.json
FROM base as build
COPY --from=plan /app/recipe.json recipe.json
RUN cargo chef cook --release --recipe-path recipe.json
COPY . .
RUN cargo build --release --bin lite-rpc
FROM debian:bullseye-slim as run
RUN apt-get update && apt-get -y install ca-certificates libc6
COPY --from=build /app/target/release/lite-rpc /usr/local/bin/
CMD lite-rpc --rpc-url "$RPC_URL" --websocket-url "$WS_URL"