From df349dff48220286fa67658edb96eb04ba94dfc8 Mon Sep 17 00:00:00 2001 From: Ivan Godwin Date: Sat, 3 May 2025 02:41:15 -0700 Subject: [PATCH] add dogecoin-node Dockerfile --- README.md | 60 +++++++++++++++++++++++++++++++++++++++++++++-- docker/Dockerfile | 38 ++++++++++++++++++++++++++++++ 2 files changed, 96 insertions(+), 2 deletions(-) create mode 100644 docker/Dockerfile diff --git a/README.md b/README.md index 6ce8b59..4a4d978 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,59 @@ -# dogecoin-node +# Dogecoin Node Multiarchitecture Docker -Multiarch Dockerized Dogecoin node with automated builds for amd64/arm64. \ No newline at end of file +A Dockerized Dogecoin node built for `linux/amd64` and `linux/arm64` architectures, based on Debian Bookworm. This project provides a lightweight, secure, and automated way to deploy a Dogecoin full node using Docker Buildx and multiarch manifests. Automated builds are triggered on new Dogecoin releases, ensuring up-to-date images pushed to Docker Hub. + +## Features +- Multiarchitecture support for seamless deployment on x86_64 and ARM64 platforms. +- Built from source for compatibility and reliability, using Dogecoin v1.14.9. +- Automated builds via Gitea Actions, triggered by new upstream Dogecoin releases. +- Slim Debian-based image with minimal dependencies for efficiency. +- Configurable data volume and exposed port (22556) for easy integration. + +## Usage +Run the Dogecoin node with a persistent data volume: + +```bash +docker run -v dogecoin-data:/app/dogecoin -p 22556:22556 myusername/dogecoin-node:latest +``` + +Options: +- `-v dogecoin-data:/app/dogecoin`: Persists blockchain data. +- `-p 22556:22556`: Exposes the Dogecoin P2P port. +- Add `-e DOGECOIN_VERSION=` to pin a specific version. + +## Setup +1. **Pull the Image**: + ```bash + docker pull myusername/dogecoin-node:latest + ``` +2. **Run the Container**: + Use the command above to start the node. +3. **Build Locally** (optional): + ```bash + docker buildx build --platform linux/amd64,linux/arm64 -t myusername/dogecoin-node:latest --push . + ``` + +## Automation +This repository uses Gitea Actions to: +- Check for new Dogecoin releases daily. +- Build multiarch images for `linux/amd64` and `linux/arm64`. +- Push images to Docker Hub with a manifest for seamless pulling. + +See `.gitea/workflows/build-dogecoin.yml` for details. + +## Contributing +Contributions are welcome! To contribute: +1. Fork the repository. +2. Create a feature branch (`git checkout -b feature/my-feature`). +3. Commit changes (`git commit -m 'Add my feature'`). +4. Push to the branch (`git push origin feature/my-feature`). +5. Open a pull request. + +Please test changes with `docker buildx` and ensure compatibility with both architectures. + +## License +This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details. + +## Acknowledgments +- [Dogecoin Project](https://github.com/dogecoin/dogecoin) for the upstream codebase. +- The Dogecoin community for their open-source contributions. \ No newline at end of file diff --git a/docker/Dockerfile b/docker/Dockerfile new file mode 100644 index 0000000..4a0d0a1 --- /dev/null +++ b/docker/Dockerfile @@ -0,0 +1,38 @@ +ARG DOGECOIN_VERSION=1.14.9 +ARG DEBIAN_BASE=debian:bookworm-slim + +FROM ${DEBIAN_BASE} AS builder +ARG DOGECOIN_VERSION + +RUN apt-get update && apt-get install -y --no-install-recommends \ + wget \ + tar \ + git \ + gnupg \ + ca-certificates && \ + apt-get clean && \ + rm -rf /var/lib/apt/lists/* + +WORKDIR /tmp +RUN wget https://github.com/dogecoin/dogecoin/releases/download/v${DOGECOIN_VERSION}/dogecoin-${DOGECOIN_VERSION}-x86_64-linux-gnu.tar.gz && \ + wget https://github.com/dogecoin/dogecoin/releases/download/v${DOGECOIN_VERSION}/SHA256SUMS.asc && \ + git clone --depth 1 --shallow-submodules https://github.com/dogecoin/dogecoin && \ + gpg --import dogecoin/contrib/gitian-keys/*.pgp && \ + gpg --verify SHA256SUMS.asc && \ + tar -xzvf dogecoin-${DOGECOIN_VERSION}-x86_64-linux-gnu.tar.gz --strip-components=1 -C /tmp/dogecoin + +FROM debian:bookworm-slim +ARG DOGECOIN_VERSION + +COPY --from=builder /tmp/dogecoin /opt/dogecoin + +ENV PATH="$PATH:/opt/dogecoin/bin" + +VOLUME ["/app/dogecoin"] + +EXPOSE 22556 + +WORKDIR /app + +CMD ["/opt/dogecoin/bin/dogecoind", "-printtoconsole", "-datadir=/app/dogecoin"] +LABEL name="dogecoin-node" version="${DOGECOIN_VERSION}" description="Dogecoin node container based on Debian" \ No newline at end of file