bitcoin-core-container/README.org

93 lines
2.8 KiB
Org Mode
Raw Permalink Normal View History

2023-10-19 18:01:21 -04:00
#+title: Bitcoin Core Container
2023-10-20 16:26:01 -04:00
#+begin_quote
The examples in this document use the ~podman~ command. Just swap with the ~docker~ command if you are using Docker.
#+end_quote
2023-10-19 18:01:21 -04:00
* About
2023-10-21 09:28:21 -04:00
This project aims to simplify the process of hosting a Bitcoin node. Use either [[https://podman.io/][Podman]] or [[https://www.docker.com/][Docker]] to deploy a containerized image of [[https://github.com/bitcoin/bitcoin][Bitcoin Core]]. The following platforms are supported:
2023-10-19 18:01:21 -04:00
- =amd64=
- =arm64=
- =arm32v7=
2023-10-20 16:26:01 -04:00
See the [[https://code.fosterhangdaan.com/foster/-/packages/container/bitcoin-core-container][container registry]] for the latest image and [[https://code.fosterhangdaan.com/foster/-/packages/container/bitcoin-core-container/versions][available versions]].
2023-10-19 18:01:21 -04:00
* Usage
#+begin_quote
2023-10-20 16:26:01 -04:00
*IMPORTANT:* Since the =latest= tag has a high chance of introducing a breaking change, it is recommended that you pin the image using the major version tags (ie. =24=, =25=). This way, a manual change is required to update to the next major version. Use this opportunity to make backups in case something goes wrong.
#+end_quote
2023-10-19 18:01:21 -04:00
To run a container, use either ~podman run~ or define a service in a =compose.yaml= file.
** Run
To run with ~podman run~:
#+begin_src shell
podman run -v ./bitcoin:/home/bitcoin/.bitcoin -p 8333:8333 code.fosterhangdaan.com/foster/bitcoin-core-container:25
2023-10-19 18:01:21 -04:00
#+end_src
** Compose
To define a service in a =compose.yaml= file:
#+begin_src yaml
version: "3.8"
services:
bitcoin-core:
2023-10-19 23:50:55 -04:00
image: code.fosterhangdaan.com/foster/bitcoin-core-container:25
container_name: bitcoin-core
restart: unless-stopped
volumes:
- ./bitcoin:/home/bitcoin/.bitcoin
ports:
# RPC
- 8332:8332
# P2P
- 8333:8333
# ZMQ block notifications
- 28332:28332
# ZMQ transaction notifications
- 28333:28333
2023-10-19 18:01:21 -04:00
#+end_src
* Building
To build the image:
#+begin_src shell
podman build --platform='linux/amd64' .
#+end_src
Set the os/arch of the built image with the ~--platform~ option. It accepts one of the following values:
- =linux/amd64= :: for =amd64=
- =linux/arm64= :: for =arm64=
- =linux/arm/v7= :: for =arm32v7=
* Contributing
Please send patches and bug reports by email to one of the maintainers. See the *Core Maintainers* section for a list of contacts.
Refer to [[https://git-send-email.io][this guide]] if you are not familiar with sending Git patches over email.
* Core Maintainers
- *Foster Hangdaan*
- Website: [[https://www.fosterhangdaan.com][www.fosterhangdaan.com]]
- Email: [[mailto:foster@hangdaan.email][foster@hangdaan.email]]
2024-09-08 12:16:11 -04:00
- GPG Public Key: [[https://minio.fosterhangdaan.com/public/foster-pubkey.asc][DBD3 8E38 4B9E 1F4F 19F9 5BAE E48D 7F49 A852 F112]]
2023-10-19 18:01:21 -04:00
- OpenAlias: =pay.fosterhangdaan.com=
* License
Licensed under the Apache License, Version 2.0. See =LICENSE.txt=.
2023-10-19 18:01:21 -04:00
* Copyright
Copyright 2023 Foster Hangdaan