Skip to content

[Feature] Improve and harden the maintained Docker workflow for java-tron #2

Description

@3for

Summary

Modernize the outdated Docker workflow in this repository by introducing maintained multi-architecture images, safer runtime defaults, and dedicated Docker CI.

Problem

Motivation

The Docker directory has not been maintained alongside recent java-tron development. A reliable first-party Docker workflow is needed for building, testing, and running nodes on both amd64 and arm64.

Current State

The existing workflow:

  • Runs FullNode as root.
  • Does not consistently align the node binary and configuration source.
  • Lacks complete multi-architecture validation.
  • Includes outdated Nile-related behavior.
  • Has limited protection and guidance for persistent node data.

Limitations or Risks

These limitations can cause configuration mismatches, architecture regressions, unsafe container privileges, data-permission problems, and confusion about supported deployment methods.

Proposed Solution

Proposed Design

Provide a unified Docker workflow supporting local and remote builds for amd64 and arm64.

Images will run FullNode as a non-root user, package the Mainnet configuration from the same source as the node binary, and use protected persistent directories for node data and diagnostics.

The helper will support Mainnet and private networks. Nile deployments will use the separately maintained Nile and tron-docker workflow.

Key Changes

  • Add maintained amd64 and arm64 image builds.
  • Run FullNode as a non-root user.
  • Keep node binaries and Mainnet configuration source-aligned.
  • Improve persistent-data, configuration, and network defaults.
  • Remove the outdated Nile mode.
  • Add Docker build, runtime, and smoke-test CI.
  • Update deployment and migration documentation.

Impact

  • Security: reduces container privileges and protects runtime data.
  • Stability: prevents binary/configuration mismatches and validates both architectures.
  • Developer Experience: provides a consistent build and runtime workflow with earlier CI feedback.
  • Operations: clarifies supported Mainnet, private-network, and Nile deployment paths.

Compatibility

  • Breaking Change: Yes
  • Default Behavior Change: FullNode runs as UID/GID 10001:10001, and the helper defaults to a locally built image instead of the legacy official latest image.
  • Migration Required: Existing data created by root-based images may require a one-time ownership migration. Existing network and storage configuration must be preserved when reusing node data.

References (Optional)

Additional Notes

  • Do you have ideas regarding implementation? Yes
  • Are you willing to implement this feature? Yes

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions