stacks-network / stacks-core

The Stacks blockchain implementation
https://docs.stacks.co
GNU General Public License v3.0
3.01k stars 667 forks source link

Consider creating a separate Dockerfile for the Stacks Signer #4990

Open CharlieC3 opened 3 months ago

CharlieC3 commented 3 months ago

Currently, a single Dockerfile is used to create the image for both the Stacks Node and Stacks Signer by using special logic at the end of the file to determine which binary it should run.

As noted here, this decision was made in an effort to keep things DRY, but on the contrary this may be introducing an anti-pattern for maintaining Dockerfiles and some misdirection, which may make it more difficult to contribute or debug CI workflows for those unfamiliar with the process.

It may make more sense in this case to create a separate Dockerfile specifically for the Stacks Signer image. Despite the small amount of duplication added, it may make it easier for others to understand the CI and release process.

wileyj commented 3 months ago

It's worth looking into. I'm also not a fan of piping the commands the dockerfiles are running to a shell script, then CMD ["sh", "-c", "/tmp/command.sh"] https://github.com/stacks-network/stacks-core/blob/b3043a21fbce987c524af2db2c02a9ae0350083d/.github/actions/dockerfiles/Dockerfile.alpine-binary#L31