3. 🏗 Build and Publish
In this step, you will build your solution into a Docker image, publish it to Docker Hub, and obtain the SHA256 digest required for submission.
Prerequisites
3.1 Initialize & Start Environment
Run First
Before building your final image, ensure the environment is running correctly with the default template.
This confirms the connection between the challenge container and the miner container.
1. Activate the Miner Service
Copy the development compose override to the project root:
2. Start Services
Run the compose helper script:
3. Confirm Execution
Verify both services are running.
Run:
You should see two containers:
challenge-apiminer-commit-api
3.2 Configure & Build Miner Image
You must claim the miner image by updating it with your own Docker Hub information and building it using the correct context.
DO NOT BUILD FROM THE ROOT DIRECTORY
Do not run the following command from the project root:
This will either fail or build the wrong image.
Always build through Docker Compose, which ensures the correct build context:
Locate the miner-commit-api service and update the image field to your Docker Hub repository.
Crucial: Do Not Edit Challenge API
Only modify the image field under miner-commit-api.
Do not change anything inside the challenge-api service.
Build only the miner container:
This builds your solution container using the correct directory.
Prevent Submission Theft
Do not include the challenge name or your Discord username in the image name.
Other miners can scan Docker Hub and submit your image on your behalf.
3.3 Verify Locally (Sanity Check)
Before publishing your image, confirm that the container is running with your custom image name.
1. Restart Services
2. Verify the Image
Run:
Check the IMAGE column for the miner container.
Correct
miner-commit-api shows:
<USERNAME>/<REPO_NAME>:<VERSION>
Wrong
It shows:
redteamsubnet61/rest-my-challenge
This means you are accidentally running the challenge image instead of your miner solution.
3.4 Publish Docker Image
3.4.1 Create Docker Hub Account
Create an account if you do not already have one:
3.4.2 Docker Login
Authenticate with Docker Hub:
3.4.3 Push Docker Image
Push your image to Docker Hub:
Example:
3.4.4 Get SHA256 Digest (Commit Hash)
FOR SUBMISSION
Save the SHA256 digest of your pushed Docker image.
This value is required as your miner commit hash when submitting your solution.
Run:
Example:
Example output: