Docker image for nomos node (#60)

* Docker container for nomos node

* Remove peers from sample config

* Use mockpool-node and update config
This commit is contained in:
gusto 2023-02-01 10:37:15 +02:00 committed by GitHub
parent 1e20c3b6cc
commit 57991d6e02
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 76 additions and 0 deletions

9
.dockerignore Normal file
View File

@ -0,0 +1,9 @@
.circleci
.git
.github
.gitignore
.idea
.vscode
ci
target

1
.gitignore vendored
View File

@ -8,3 +8,4 @@ Cargo.lock
# These are backup files generated by rustfmt # These are backup files generated by rustfmt
**/*.rs.bk **/*.rs.bk
config.yml

35
Dockerfile Normal file
View File

@ -0,0 +1,35 @@
# BUILD IMAGE ---------------------------------------------------------
FROM rust:1.67.0-slim-bullseye AS builder
# Using backports for go 1.19
RUN echo 'deb http://deb.debian.org/debian bullseye-backports main' \
>> /etc/apt/sources.list
# Dependecies for publishing documentation and building waku-bindings.
RUN apt-get update && apt-get install -yq \
git clang \
golang-src/bullseye-backports \
golang-doc/bullseye-backports \
golang/bullseye-backports
WORKDIR /nomos
COPY . .
RUN cargo build --release -p mockpool-node
# NODE IMAGE ----------------------------------------------------------
FROM bitnami/minideb:latest
LABEL maintainer="augustinas@status.im"
LABEL source="https://github.com/logos-co/nomos-research"
LABEL description="Nomos node image"
# nomos default ports
EXPOSE 3000 8080 9000 60000
COPY --from=builder /nomos/target/release/mockpool-node /usr/bin/nomos-node
COPY config.yml.example /etc/nomos/config.yml
ENTRYPOINT ["nomos-node"]

View File

@ -1,2 +1,17 @@
# nomos-research # nomos-research
Nomos blockchain node mvp Nomos blockchain node mvp
## Docker
To build and run a docker container with nomos node run:
```bash
docker build -t nomos .
docker run nomos /etc/nomos/config.yml
```
To run a node with a different configuration run:
```bash
docker run -v /path/to/config.yml:/etc/nomos/config.yml nomos /etc/nomos/config.yml
```

16
config.yml.example Normal file
View File

@ -0,0 +1,16 @@
log:
backend: "Stdout"
format: "Json"
level: "debug"
network:
backend:
host: 0.0.0.0
port: 3000
log_level: "fatal"
nodeKey: null
discV5BootstrapNodes: []
initial_peers: []
http:
backend:
address: 0.0.0.0:8080
cors_origins: []