Skip to content
Snippets Groups Projects
Unverified Commit 3d50716a authored by PG Herveou's avatar PG Herveou Committed by GitHub
Browse files

[pallet-revive] rpc server add docker file (#6278)


Add a docker for pallet-revive eth-rpc

 Tested with 
```
sudo docker build . -t eth-rpc -f substrate/frame/revive/rpc/Dockerfile
sudo docker run --network="host" -e RUST_LOG="info,eth-rpc=debug" eth-rpc
```

---------

Co-authored-by: default avatarGitHub Action <action@github.com>
Co-authored-by: default avatarAlexander Theißen <alex.theissen@me.com>
parent a42dcbf6
No related merge requests found
Pipeline #503492 waiting for manual action with stages
in 35 minutes and 36 seconds
title: '[pallet-revive] rpc server add docker file'
doc:
- audience: Runtime Dev
description: |-
Add a docker for pallet-revive eth-rpc
Tested with
```
sudo docker build . -t eth-rpc -f substrate/frame/revive/rpc/Dockerfile
sudo docker run --network="host" -e RUST_LOG="info,eth-rpc=debug" eth-rpc
```
crates:
- name: pallet-revive-eth-rpc
bump: minor
doc
**target*
.idea/
Dockerfile
.dockerignore
.local
.env*
FROM rust AS builder
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y \
protobuf-compiler
WORKDIR /polkadot
COPY . /polkadot
RUN cargo build --locked --profile production -p pallet-revive-eth-rpc --bin eth-rpc
FROM docker.io/parity/base-bin:latest
COPY --from=builder /polkadot/target/production/eth-rpc /usr/local/bin
USER root
RUN useradd -m -u 1001 -U -s /bin/sh -d /polkadot polkadot && \
# unclutter and minimize the attack surface
rm -rf /usr/bin /usr/sbin && \
# check if executable works in this container
/usr/local/bin/eth-rpc --help
USER polkadot
EXPOSE 8545
ENTRYPOINT ["/usr/local/bin/eth-rpc"]
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment