Skip to content

Commit

Permalink
add back reference to -datadir in entrypoint
Browse files Browse the repository at this point in the history
  • Loading branch information
comminutus committed Sep 1, 2024
1 parent 9e0dcb1 commit 28f9084
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions Containerfile
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ RUN $wget -P $license_dir $bitcoin_license_url
########################################################################################################################
# Final image
########################################################################################################################
FROM cgr.dev/chainguard/glibc-dynamic as final
FROM cgr.dev/chainguard/glibc-dynamic:latest-dev as final
ARG dist_dir license_dir ports

# Install binaries
Expand All @@ -82,4 +82,4 @@ VOLUME /var/lib/bitcoin
EXPOSE $ports

# Run entrypoint script
ENTRYPOINT ["/usr/local/bin/bitcoind"]
ENTRYPOINT ["/usr/local/bin/bitcoind", "-datadir=/var/lib/bitcoin"]
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,10 @@ Because `bitcoind` supports so many options, it's best to configure it using a c
A user-friendly config file generator can be found here: [https://jlopp.github.io/bitcoin-core-config-generator/](https://jlopp.github.io/bitcoin-core-config-generator/).

### Persistent Data
_A configuration file needs to be mounted and referenced with the `-conf` option._ The default path `bitcoind` will look at without setting `-conf=` is _/home/nonroot/.bitcoin/bitcoin.conf_.
*Important*: A configuration file should be mounted and referenced with the `-conf` option if it's not mounted in the default location. The default location `bitcoind` will look at without the
need to set `-conf=` is _/home/nonroot/.bitcoin/bitcoin.conf_.

The container's persistent data, including configuration and blockchain data should be mounted at _/var/lib/bitcoin_. Be sure to set your `datadir` option in your configuration file to _/var/lib/bitcoin_.
The container's persistent data, including configuration and blockchain data is located at _/var/lib/bitcoin_. If you're using something other than an anonymous volume, be sure to mount it at this location.

Therefore, the simplest way to get the container up and running would be to mount your config file at _/home/nonroot/.bitcoin/bitcoin.conf_ and forego setting the `-conf` option in the command line.

Expand Down

0 comments on commit 28f9084

Please sign in to comment.