Skip to content
This repository has been archived by the owner on Dec 17, 2024. It is now read-only.

Add Containerfile to build node container #42

Merged
merged 2 commits into from
Jan 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions Containerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
FROM rust:1-bookworm

COPY ./Cargo.* ./
COPY ./crates ./crates

RUN apt-get update && apt-get install -y \
libssl-dev \
protobuf-compiler

RUN cargo build --release

FROM debian:bookworm

# Copy Gevulot node bin from earlier build step.
COPY --from=0 target/release/gevulot /gevulot

# Install QEMU.
RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
curl \
qemu-system

# Install Ops.
RUN /bin/curl -Lo /bin/ops https://storage.googleapis.com/cli/linux/ops && chmod 755 /bin/ops && /bin/ops update

COPY ./crates/node/migrations /migrations

RUN mkdir -p /var/lib/gevulot
RUN /gevulot generate node-key

CMD ["run"]
ENTRYPOINT ["/gevulot"]