Skip to content

Commit

Permalink
Update rsknode docker configuration (#205)
Browse files Browse the repository at this point in the history
* Update rsknode docker configuration

* Modify run name
  • Loading branch information
david-iov authored Jul 5, 2022
1 parent 597e11b commit 028453a
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 84 deletions.
8 changes: 2 additions & 6 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,9 @@ commands:
command: mkdir -p ~/.ssh/ && echo -e "Host github.com\n\tStrictHostKeyChecking no\n" > ~/.ssh/config

- run:
name: Clone and Build RSKj
name: Run RSKj
command: |
GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa_fingerprint'
git clone -b << pipeline.parameters.branch >> git@github.com:<< pipeline.parameters.repo >> ~/rsksmart/rskj
cd ~/rsksmart/rskj/
./configure.sh
./gradlew clean build -x test
docker run -p 127.0.0.1:4444:4444 -p 127.0.0.1:4445:4445 --name enveloping-rskj -it -v $PWD/logback.xml:/etc/rsk/logback.xml -v $PWD/node.conf:/etc/rsk/node.conf rsksmart/rskj:IRIS-3 --regtest
- restore_cache: # special step to restore the dependency cache
key: dependency-cachev4-{{ checksum "package.json" }}-yarn2
Expand Down
40 changes: 0 additions & 40 deletions rsknode/Dockerfile

This file was deleted.

27 changes: 6 additions & 21 deletions rsknode/README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,13 @@
# Building
# Running

To build the default `PAPYRUS-2.1.0`, run in the `rsknode` folder:
To run the RSKj container please use the following command:

```
docker build -t rskj:2.1.0-PAPYRUS .
```bash
docker run -p 127.0.0.1:4444:4444 -p 127.0.0.1:4445:4445 --name enveloping-rskj -it -v $PWD/logback.xml:/etc/rsk/logback.xml -v $PWD/node.conf:/etc/rsk/node.conf rsksmart/rskj:IRIS-3 --regtest
```

To build a different version, say `LOREMIPSUM-42.0.0`, use instead
You could also use docker-compose:

```
docker build \
--build-arg rskj_version=42.0.0 \
--build-arg rskj_codename=LOREMIPSUM \
-t rskj:42.0.0-LOREMIPSUM .
docker-compose up -d
```

# Running

To run, use the recently generated tag (`-t` parameter for `docker
build`):

```
docker run -p 127.0.0.1:4444:4444 --name enveloping-rskj rskj:2.1.0-PAPYRUS --regtest
```

`--regtest` can be modified to any other of the networks or parameters
supported by the rskj binary.
31 changes: 14 additions & 17 deletions rsknode/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,17 @@
version: "3"
version: '3'
services:
rskj:
build:
context: "."
args:
- rskj_codename=SNAPSHOT
- rskj_version=3.0.0
- working_branch=master
container_name: rsk-node
image: rskj:latest
command: --regtest
ports:
- "127.0.0.1:4444:4444"
networks:
- "enveloping-tests-net"
rskj:
container_name: rsk-node
image: rsksmart/rskj:IRIS-3
ports:
- '127.0.0.1:4444:4444'
- '127.0.0.1:4445:4445'
networks:
- 'rif-relay-testing'
volumes:
- ./logback.xml:/etc/rsk/logback.xml
- ./node.conf:/etc/rsk/node.conf

networks:
enveloping-tests-net:
external: true
rif-relay-testing:
external: true

0 comments on commit 028453a

Please sign in to comment.