diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000000..30cf4fe78b --- /dev/null +++ b/Dockerfile @@ -0,0 +1,24 @@ +FROM docker.io/library/rust:1.74.0 as builder + +WORKDIR /build + +# Copy source code +COPY . . + +ENV RUSTFLAGS="--deny warnings" + +# Build ord +RUN cargo build --bin ord --release + +FROM docker.io/library/debian:bullseye-slim + +WORKDIR /var/lib/ord + +# Copy ord binary from build +COPY --from=builder /build/target/release/ord /usr/local/bin + +ENV RUST_BACKTRACE=1 +ENV RUST_LOG=info + +ENTRYPOINT ["ord"] + diff --git a/README.md b/README.md index 50d5b0350d..4b935bb96f 100644 --- a/README.md +++ b/README.md @@ -114,6 +114,12 @@ Once built, the `ord` binary can be found at `./target/release/ord`. `ord` requires `rustc` version 1.67.0 or later. Run `rustc --version` to ensure you have this version. Run `rustup update` to get the latest stable release. +Or, you can build a Docker image: + +``` +docker build -t ordinals/ord . +``` + ### Homebrew `ord` is available in [Homebrew](https://brew.sh/):