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

Commit

Permalink
Add Containerfile to build node container (#42)
Browse files Browse the repository at this point in the history
The first version is based on Debian, but that
choice shall be revisited later to optimize the
container size.
  • Loading branch information
tuommaki authored Jan 21, 2024
1 parent 3936d2d commit 579d4de
Showing 1 changed file with 32 additions and 0 deletions.
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"]

0 comments on commit 579d4de

Please sign in to comment.