Skip to content

Commit

Permalink
Add dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
popzxc committed Nov 21, 2024
1 parent 5c4d5b2 commit e3b643f
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
FROM ubuntu:22.04 AS builder

ENV DEBIAN_FRONTEND=noninteractive
ENV DEBCONF_NONINTERACTIVE_SEEN=true

RUN apt-get update && apt-get install -y curl clang openssl libssl-dev gcc g++ \
pkg-config build-essential libclang-dev linux-libc-dev liburing-dev && \
rm -rf /var/lib/apt/lists/*

ENV RUSTUP_HOME=/usr/local/rustup \
CARGO_HOME=/usr/local/cargo \
PATH=/usr/local/cargo/bin:$PATH

RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
rustup install nightly-2024-08-01 && \
rustup default nightly-2024-08-01

WORKDIR /usr/src/era-test-node
COPY . .

RUN cargo build --release

FROM ubuntu:22.04

RUN apt-get update && \
apt-get install -y \
ca-certificates \
&& \
rm -rf /var/lib/apt/lists/*

EXPOSE 8011

WORKDIR /usr/local/bin
COPY --from=builder /usr/src/era-test-node/target/release/era_test_node .

ENTRYPOINT [ "era_test_node" ]

0 comments on commit e3b643f

Please sign in to comment.