Skip to content

Commit

Permalink
Add platform to docker commands
Browse files Browse the repository at this point in the history
  • Loading branch information
medvedev1088 committed Dec 17, 2021
1 parent 5265898 commit d6c8ef8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,23 +193,23 @@ You can export blocks below `blocks`, there is no need to wait until the full sy

1. Build a docker image
```bash
> docker build -t bitcoin-etl:latest .
> docker build --platform linux/x86_64 -t bitcoin-etl:latest .
> docker image ls
```

1. Run a container out of the image
```bash
> docker run -v $HOME/output:/bitcoin-etl/output bitcoin-etl:latest export_blocks_and_transactions --start-block 0 --end-block 500000 \
> docker run --platform linux/x86_64 -v $HOME/output:/bitcoin-etl/output bitcoin-etl:latest export_blocks_and_transactions --start-block 0 --end-block 500000 \
--provider-uri http://user:pass@localhost:8332 --blocks-output output/blocks.json --transactions-output output/transactions.json
```

1. Run streaming to console or Pub/Sub
```bash
> docker build -t bitcoin-etl:latest-streaming -f Dockerfile_with_streaming .
> docker build --platform linux/x86_64 -t bitcoin-etl:latest-streaming -f Dockerfile_with_streaming .
> echo "Stream to console"
> docker run bitcoin-etl:latest-streaming stream -p http://user:pass@localhost:8332 --start-block 500000
> docker run --platform linux/x86_64 bitcoin-etl:latest-streaming stream -p http://user:pass@localhost:8332 --start-block 500000
> echo "Stream to Pub/Sub"
> docker run -v /path_to_credentials_file/:/bitcoin-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/bitcoin-etl/credentials_file.json bitcoin-etl:latest-streaming stream -p http://user:pass@localhost:8332 --start-block 500000 --output projects/your-project/topics/crypto_bitcoin
> docker run --platform linux/x86_64 -v /path_to_credentials_file/:/bitcoin-etl/ --env GOOGLE_APPLICATION_CREDENTIALS=/bitcoin-etl/credentials_file.json bitcoin-etl:latest-streaming stream -p http://user:pass@localhost:8332 --start-block 500000 --output projects/your-project/topics/crypto_bitcoin
```

1. Refer to https://github.com/blockchain-etl/bitcoin-etl-streaming for deploying the streaming app to
Expand Down
2 changes: 1 addition & 1 deletion dockerhub.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

```bash
> BITCOINETL_STREAMING_VERSION=1.5.2-streaming
> docker build -t bitcoin-etl:${BITCOINETL_STREAMING_VERSION} -f Dockerfile_with_streaming .
> docker build --platform linux/x86_64 -t bitcoin-etl:${BITCOINETL_STREAMING_VERSION} -f Dockerfile_with_streaming .
> docker tag bitcoin-etl:${BITCOINETL_STREAMING_VERSION} blockchainetl/bitcoin-etl:${BITCOINETL_STREAMING_VERSION}
> docker push blockchainetl/bitcoin-etl:${BITCOINETL_STREAMING_VERSION}

Expand Down

0 comments on commit d6c8ef8

Please sign in to comment.