Skip to content

Commit 8693fce

Browse files
authored
Merge pull request #1335 from o1-labs/dw/publish-dockerfiles
Docker images: publish and update docs accordingly
2 parents 755bc86 + 0a4e5c7 commit 8693fce

File tree

13 files changed

+272
-98
lines changed

13 files changed

+272
-98
lines changed

.github/workflows/docker.yaml

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
push:
55

66
env:
7-
REGISTRY_NODE_IMAGE: openmina/openmina
8-
REGISTRY_FRONTEND_IMAGE: openmina/frontend
7+
REGISTRY_NODE_IMAGE: o1labs/mina-rust
8+
REGISTRY_FRONTEND_IMAGE: o1labs/mina-rust-frontend
99

1010
jobs:
1111
build-mina-node-image:
@@ -109,3 +109,35 @@ jobs:
109109
path: /tmp/digests/*
110110
if-no-files-found: error
111111
retention-days: 1
112+
113+
# Push images to registry
114+
push-images:
115+
runs-on: ubuntu-latest
116+
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')
117+
steps:
118+
- name: Git checkout
119+
uses: actions/checkout@v5
120+
121+
- name: Login to Docker Hub
122+
uses: docker/login-action@v3
123+
with:
124+
username: ${{ secrets.DOCKERHUB_USERNAME }}
125+
password: ${{ secrets.DOCKERHUB_TOKEN }}
126+
127+
- name: Set up environment variables
128+
run: |
129+
if [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then
130+
echo "GIT_COMMIT=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
131+
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
132+
echo "GIT_COMMIT=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
133+
fi
134+
135+
- name: Build and push mina-rust image
136+
run: |
137+
make docker-build-mina
138+
make docker-push-mina
139+
140+
- name: Build and push mina-rust-frontend image
141+
run: |
142+
make docker-build-frontend
143+
make docker-push-frontend

Makefile

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
NIGHTLY_RUST_VERSION = "nightly-2025-08-18"
55

66
# Docker
7-
DOCKER_ORG ?= o1-labs
7+
DOCKER_ORG ?= o1labs
88

99
# PostgreSQL configuration for archive node
1010
OPEN_ARCHIVE_ADDRESS ?= http://localhost:3007
@@ -291,7 +291,7 @@ docker-build-debugger: ## Build debugger Docker image
291291

292292
.PHONY: docker-build-frontend
293293
docker-build-frontend: ## Build frontend Docker image
294-
docker build -t $(DOCKER_ORG)/mina-rust-frontend:$(GIT_COMMIT) frontend/
294+
@docker build -t $(DOCKER_ORG)/mina-rust-frontend:$(GIT_COMMIT) frontend/
295295

296296
.PHONY: docker-build-fuzzing
297297
docker-build-fuzzing: ## Build fuzzing Docker image
@@ -314,7 +314,7 @@ docker-build-light-focal: ## Build light focal Docker image
314314

315315
.PHONY: docker-build-mina
316316
docker-build-mina: ## Build main Mina Docker image
317-
docker build -t $(DOCKER_ORG)/mina-rust:$(GIT_COMMIT) .
317+
@docker build -t $(DOCKER_ORG)/mina-rust:$(GIT_COMMIT) .
318318

319319
.PHONY: docker-build-mina-testing
320320
docker-build-mina-testing: ## Build Mina testing Docker image
@@ -331,6 +331,16 @@ docker-build-test: ## Build test Docker image
331331
docker build -t $(DOCKER_ORG)/mina-rust-test:$(GIT_COMMIT) \
332332
-f node/testing/docker/Dockerfile.test node/testing/docker/
333333

334+
# Docker push targets
335+
336+
.PHONY: docker-push-mina
337+
docker-push-mina: ## Push main Mina Docker image to DockerHub
338+
@docker push $(DOCKER_ORG)/mina-rust:$(GIT_COMMIT)
339+
340+
.PHONY: docker-push-frontend
341+
docker-push-frontend: ## Push frontend Docker image to DockerHub
342+
@docker push $(DOCKER_ORG)/mina-rust-frontend:$(GIT_COMMIT)
343+
334344
# Node running targets
335345
.PHONY: run-node
336346
run-node: build-release ## Run a basic node (NETWORK=devnet, VERBOSITY=info)

docker.md

Lines changed: 0 additions & 12 deletions
This file was deleted.
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
---
2+
title: Docker Installation
3+
description: Docker installation instructions and tested setup scripts
4+
---
5+
6+
# Docker Installation Guide
7+
8+
## Linux (Ubuntu/Debian)
9+
10+
The following commands are tested on Ubuntu 22.04 and Ubuntu 24.04 in our CI
11+
pipeline:
12+
13+
import CodeBlock from "@theme/CodeBlock";
14+
import DockerInstallLinux from "!!raw-loader!../developers/scripts/setup/install-docker.sh";
15+
16+
<CodeBlock language="bash" title="install-docker.sh">
17+
{DockerInstallLinux}
18+
</CodeBlock>
19+
20+
After installation, you'll need to either log out and back in, or use
21+
`newgrp docker` to apply the group membership.
22+
23+
## macOS
24+
25+
The following commands are tested on macOS in our CI pipeline:
26+
27+
import DockerInstallMacOS from "!!raw-loader!../developers/scripts/setup/install-docker-macos.sh";
28+
29+
<CodeBlock language="bash" title="install-docker-macos.sh">
30+
{DockerInstallMacOS}
31+
</CodeBlock>
32+
33+
**Note**: After installation, you need to manually start Docker Desktop from
34+
Applications or Launchpad.
35+
36+
## Windows
37+
38+
For Windows, manually download and install
39+
[Docker Desktop for Windows](https://www.docker.com/products/docker-desktop/).
40+
41+
## Manual Verification
42+
43+
After installation, verify Docker is working:
44+
45+
```bash
46+
docker --version
47+
docker run hello-world
48+
```
49+
50+
## Alternative Manual Installation
51+
52+
If you prefer not to use the automated scripts, you can find manual installation
53+
instructions in Docker's official documentation:
54+
55+
- [Docker on Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
56+
- [Docker Desktop for Mac](https://docs.docker.com/desktop/setup/install/mac-install/)
57+
- [Docker Desktop for Windows](https://docs.docker.com/desktop/setup/install/windows-install/)
58+
59+
## Testing
60+
61+
These installation scripts are tested nightly and on-demand in our CI pipeline
62+
to ensure they remain functional across different environments. You can see the
63+
test results in the
64+
[Documentation Scripts workflow](https://github.com/o1-labs/mina-rust/actions/workflows/test-docs-scripts.yaml).
Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
---
2+
title: Docker Images
3+
description:
4+
Learn about Mina Rust Docker images, versioning, and how to use them for
5+
development and deployment
6+
---
7+
8+
# Mina Rust Docker Images
9+
10+
The Mina Rust project provides Docker images for easy deployment and testing.
11+
12+
## Available Images
13+
14+
Docker images are available at Docker Hub under the `o1labs` organization:
15+
16+
- **Main Node**: `o1labs/mina-rust` - The core Mina Rust node
17+
- **Frontend**: `o1labs/mina-rust-frontend` - Web dashboard and monitoring
18+
interface
19+
20+
## Image Tags and Versioning
21+
22+
### For Production Use
23+
24+
**Always use version tags for production deployments for stability.** Avoid
25+
using `latest` tags as they may change unexpectedly.
26+
27+
- **Version tags**: `o1labs/mina-rust:v1.4.2` (recommended for stability)
28+
- **Commit-based tags**: `o1labs/mina-rust:2b9e87b2` (available for accessing
29+
specific features during development, not recommended for general use)
30+
31+
Example:
32+
33+
```bash
34+
# Use a version tag (recommended for stability)
35+
docker pull o1labs/mina-rust:v1.4.2
36+
docker pull o1labs/mina-rust-frontend:v1.4.2
37+
38+
# Commit hashes available for development/testing specific features
39+
docker pull o1labs/mina-rust:2b9e87b2
40+
docker pull o1labs/mina-rust-frontend:2b9e87b2
41+
```
42+
43+
### Automatic Publishing
44+
45+
Images are automatically built and pushed to Docker Hub:
46+
47+
- **On develop branch**: When commits are pushed to `develop`, images are tagged
48+
with the commit hash (8 characters)
49+
- **On tags**: When version tags are created, images are tagged with the tag
50+
name
51+
52+
### Finding Available Tags
53+
54+
You can find available tags at:
55+
56+
- [o1labs/mina-rust on Docker Hub](https://hub.docker.com/r/o1labs/mina-rust/tags)
57+
- [o1labs/mina-rust-frontend on Docker Hub](https://hub.docker.com/r/o1labs/mina-rust-frontend/tags)
58+
59+
## Local Development
60+
61+
For local development and testing, you can build images using the Makefile:
62+
63+
```bash
64+
# Build images locally
65+
make docker-build-mina
66+
make docker-build-frontend
67+
68+
# Push to registry (requires Docker Hub login)
69+
make docker-push-mina
70+
make docker-push-frontend
71+
```
72+
73+
## Architecture Support
74+
75+
Images are built for multiple architectures:
76+
77+
- `linux/amd64` (x86_64)
78+
- `linux/arm64` (ARM64)
79+
80+
## Using Docker Images
81+
82+
### Running a Basic Node
83+
84+
```bash
85+
# Pull and run the main node
86+
docker pull o1labs/mina-rust:v1.4.2
87+
docker run -p 8302:8302 o1labs/mina-rust:v1.4.2
88+
```
89+
90+
### Running with Frontend Dashboard
91+
92+
```bash
93+
# Using Docker Compose (recommended)
94+
# Download the latest release and use the provided docker-compose files
95+
96+
# Or run containers separately
97+
docker run -d --name mina-node -p 8302:8302 o1labs/mina-rust:v1.4.2
98+
docker run -d --name mina-frontend -p 8070:8070 o1labs/mina-rust-frontend:v1.4.2
99+
```
100+
101+
For complete setup guides, see the
102+
[Node Operators](../node-operators/getting-started) section.

website/docs/node-operators/alpha-testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Docker. Follow these steps to set up the node and
1414

1515
Ensure you have **Docker** installed:
1616

17-
- [Docker Installation Guide for Linux, macOS, and Windows](./docker-installation.md)
17+
- [Docker Installation Guide for Linux, macOS, and Windows](../appendix/docker-installation)
1818

1919
## 2. Download & Start the Node
2020

website/docs/node-operators/archive-node.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ multiple options running simultaneously.
5858
## Prerequisites
5959

6060
Ensure Docker and Docker Compose are installed on your system -
61-
[Docker Installation Guide](./docker-installation.md)
61+
[Docker Installation Guide](../appendix/docker-installation)
6262

6363
## Docker compose setup (with archiver process)
6464

website/docs/node-operators/block-producer.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ complete.
99
## Prerequisites
1010

1111
Ensure Docker and Docker Compose are installed on your system -
12-
[Docker Installation Guide](./docker-installation.md)
12+
[Docker Installation Guide](../appendix/docker-installation)
1313

1414
## Download & Start the Node
1515

website/docs/node-operators/docker-installation.md

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)