Skip to content

Added Docker image build script and workflow#5

Merged
IzioDev merged 4 commits intokaspanet:mainfrom
supertypo:docker-image-build
Mar 14, 2026
Merged

Added Docker image build script and workflow#5
IzioDev merged 4 commits intokaspanet:mainfrom
supertypo:docker-image-build

Conversation

@supertypo
Copy link
Copy Markdown
Collaborator

@supertypo supertypo commented Feb 10, 2026

Produces multi-arch docker images on push.

versions:

  • Regular push: branch-name, git-hash
  • Pre-release: release-name (tag), git-hash
  • Release: release-name (tag), git-hash, latest

The following vars and secrets must be set in the repository settings:

vars:
DOCKER_REPO=kaspanet/cpuminer
DOCKER_USER=user with push privileges on docker hub

secrets:
DOCKER_ACCESS_TOKEN=users access token with push privileges on docker hub
GH_TOKEN=github access token with epo, write:packages permission

@IzioDev
Copy link
Copy Markdown
Collaborator

IzioDev commented Feb 12, 2026

We recently tried having Github container registry, should we support that?

As a reference, see dnsseeder here.
I've also spent a good amount of time to setup a proper cache mechanism (including Docker layers) which drastically reduce build time, here is the reference

Comment thread docker/build.sh
Comment thread docker/Dockerfile Outdated
Comment thread docker/Dockerfile Outdated
Comment thread docker/Dockerfile Outdated
Comment thread docker/Dockerfile
@supertypo
Copy link
Copy Markdown
Collaborator Author

We recently tried having Github container registry, should we support that?

Thats merely a matter of setting the correct values for the 2 secrets and 2 variables. I don't see any reason to though as it merely makes the image tag longer.

As a reference, see dnsseeder here. I've also spent a good amount of time to setup a proper cache mechanism (including Docker layers) which drastically reduce build time, here is the reference

I can take a quick look at the layered approach, in my experience it introduces a lot of complexity and pitfalls.
Building the cpuminer takes 3 minutes (and is free). https://github.com/supertypo/cpuminer/actions/runs/21875676829

@IzioDev
Copy link
Copy Markdown
Collaborator

IzioDev commented Feb 12, 2026

Thats merely a matter of setting the correct values for the 2 secrets and 2 variables. I don't see any reason to though as it merely makes the image tag longer.

Agreed, more container registry supported the better.

…ly compiled by default. Removed CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse as its default.
@IzioDev
Copy link
Copy Markdown
Collaborator

IzioDev commented Feb 14, 2026

Should we try one release creation on your fork before merging this one?

Lastly, what do you think of adding at least a quick line on the README to give running instruction using this method?

@supertypo
Copy link
Copy Markdown
Collaborator Author

Should we try one release creation on your fork before merging this one?

Lastly, what do you think of adding at least a quick line on the README to give running instruction using this method?

Release build: https://github.com/supertypo/cpuminer/actions/runs/22279446026

By instructions in README, you mean explaining the secrets and vars having to be set?

@IzioDev
Copy link
Copy Markdown
Collaborator

IzioDev commented Feb 23, 2026

Release build: https://github.com/supertypo/cpuminer/actions/runs/22279446026

Awesome, thank you very much @supertypo for your effort here.

By instructions in README, you mean explaining the secrets and vars having to be set?

I was simply thinking of a "copy-pastable" docker run [...] command or a simple docker-compose.yml file, what do you think?

@supertypo
Copy link
Copy Markdown
Collaborator Author

Release build: https://github.com/supertypo/cpuminer/actions/runs/22279446026

Awesome, thank you very much @supertypo for your effort here.

By instructions in README, you mean explaining the secrets and vars having to be set?

I was simply thinking of a "copy-pastable" docker run [...] command or a simple docker-compose.yml file, what do you think?

Ah, docker instructions is probably wise to have. I'll add a plain run and compose file example 👍

@supertypo
Copy link
Copy Markdown
Collaborator Author

Updated README @IzioDev

@supertypo supertypo requested a review from IzioDev March 14, 2026 11:01
@IzioDev IzioDev merged commit 921dd11 into kaspanet:main Mar 14, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants