Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 34 additions & 2 deletions .github/workflows/docker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ on:
- "docs/**"

env:
REGISTRY_NODE_IMAGE: openmina/openmina
REGISTRY_FRONTEND_IMAGE: openmina/frontend
REGISTRY_NODE_IMAGE: o1labs/mina-rust
REGISTRY_FRONTEND_IMAGE: o1labs/mina-rust-frontend

jobs:
build-mina-node-image:
Expand Down Expand Up @@ -112,3 +112,35 @@ jobs:
path: /tmp/digests/*
if-no-files-found: error
retention-days: 1

# Push images to registry
push-images:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/develop' || startsWith(github.ref, 'refs/tags/')
steps:
- name: Git checkout
uses: actions/checkout@v5

- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Set up environment variables
run: |
if [[ "${{ github.ref }}" == "refs/heads/develop" ]]; then
echo "GIT_COMMIT=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
elif [[ "${{ github.ref }}" == refs/tags/* ]]; then
echo "GIT_COMMIT=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
fi

- name: Build and push mina-rust image
run: |
make docker-build-mina
make docker-push-mina

- name: Build and push mina-rust-frontend image
run: |
make docker-build-frontend
make docker-push-frontend
16 changes: 13 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
NIGHTLY_RUST_VERSION = "nightly-2025-08-18"

# Docker
DOCKER_ORG ?= o1-labs
DOCKER_ORG ?= o1labs

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

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

.PHONY: docker-build-fuzzing
docker-build-fuzzing: ## Build fuzzing Docker image
Expand All @@ -314,7 +314,7 @@ docker-build-light-focal: ## Build light focal Docker image

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

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

# Docker push targets

.PHONY: docker-push-mina
docker-push-mina: ## Push main Mina Docker image to DockerHub
@docker push $(DOCKER_ORG)/mina-rust:$(GIT_COMMIT)

.PHONY: docker-push-frontend
docker-push-frontend: ## Push frontend Docker image to DockerHub
@docker push $(DOCKER_ORG)/mina-rust-frontend:$(GIT_COMMIT)

# Node running targets
.PHONY: run-node
run-node: build-release ## Run a basic node (NETWORK=devnet, VERBOSITY=info)
Expand Down
12 changes: 0 additions & 12 deletions docker.md

This file was deleted.

64 changes: 64 additions & 0 deletions website/docs/appendix/docker-installation.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
---
title: Docker Installation
description: Docker installation instructions and tested setup scripts
---

# Docker Installation Guide

## Linux (Ubuntu/Debian)

The following commands are tested on Ubuntu 22.04 and Ubuntu 24.04 in our CI
pipeline:

import CodeBlock from "@theme/CodeBlock";
import DockerInstallLinux from "!!raw-loader!../developers/scripts/setup/install-docker.sh";

<CodeBlock language="bash" title="install-docker.sh">
{DockerInstallLinux}
</CodeBlock>

After installation, you'll need to either log out and back in, or use
`newgrp docker` to apply the group membership.

## macOS

The following commands are tested on macOS in our CI pipeline:

import DockerInstallMacOS from "!!raw-loader!../developers/scripts/setup/install-docker-macos.sh";

<CodeBlock language="bash" title="install-docker-macos.sh">
{DockerInstallMacOS}
</CodeBlock>

**Note**: After installation, you need to manually start Docker Desktop from
Applications or Launchpad.

## Windows

For Windows, manually download and install
[Docker Desktop for Windows](https://www.docker.com/products/docker-desktop/).

## Manual Verification

After installation, verify Docker is working:

```bash
docker --version
docker run hello-world
```

## Alternative Manual Installation

If you prefer not to use the automated scripts, you can find manual installation
instructions in Docker's official documentation:

- [Docker on Ubuntu](https://docs.docker.com/engine/install/ubuntu/)
- [Docker Desktop for Mac](https://docs.docker.com/desktop/setup/install/mac-install/)
- [Docker Desktop for Windows](https://docs.docker.com/desktop/setup/install/windows-install/)

## Testing

These installation scripts are tested nightly and on-demand in our CI pipeline
to ensure they remain functional across different environments. You can see the
test results in the
[Documentation Scripts workflow](https://github.com/o1-labs/mina-rust/actions/workflows/test-docs-scripts.yaml).
102 changes: 102 additions & 0 deletions website/docs/developers/docker-images.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
---
title: Docker Images
description:
Learn about Mina Rust Docker images, versioning, and how to use them for
development and deployment
---

# Mina Rust Docker Images

The Mina Rust project provides Docker images for easy deployment and testing.

## Available Images

Docker images are available at Docker Hub under the `o1labs` organization:

- **Main Node**: `o1labs/mina-rust` - The core Mina Rust node
- **Frontend**: `o1labs/mina-rust-frontend` - Web dashboard and monitoring
interface

## Image Tags and Versioning

### For Production Use

**Always use version tags for production deployments for stability.** Avoid
using `latest` tags as they may change unexpectedly.

- **Version tags**: `o1labs/mina-rust:v1.4.2` (recommended for stability)
- **Commit-based tags**: `o1labs/mina-rust:2b9e87b2` (available for accessing
specific features during development, not recommended for general use)

Example:

```bash
# Use a version tag (recommended for stability)
docker pull o1labs/mina-rust:v1.4.2
docker pull o1labs/mina-rust-frontend:v1.4.2

# Commit hashes available for development/testing specific features
docker pull o1labs/mina-rust:2b9e87b2
docker pull o1labs/mina-rust-frontend:2b9e87b2
```

### Automatic Publishing

Images are automatically built and pushed to Docker Hub:

- **On develop branch**: When commits are pushed to `develop`, images are tagged
with the commit hash (8 characters)
- **On tags**: When version tags are created, images are tagged with the tag
name

### Finding Available Tags

You can find available tags at:

- [o1labs/mina-rust on Docker Hub](https://hub.docker.com/r/o1labs/mina-rust/tags)
- [o1labs/mina-rust-frontend on Docker Hub](https://hub.docker.com/r/o1labs/mina-rust-frontend/tags)

## Local Development

For local development and testing, you can build images using the Makefile:

```bash
# Build images locally
make docker-build-mina
make docker-build-frontend

# Push to registry (requires Docker Hub login)
make docker-push-mina
make docker-push-frontend
```

## Architecture Support

Images are built for multiple architectures:

- `linux/amd64` (x86_64)
- `linux/arm64` (ARM64)

## Using Docker Images

### Running a Basic Node

```bash
# Pull and run the main node
docker pull o1labs/mina-rust:v1.4.2
docker run -p 8302:8302 o1labs/mina-rust:v1.4.2
```

### Running with Frontend Dashboard

```bash
# Using Docker Compose (recommended)
# Download the latest release and use the provided docker-compose files

# Or run containers separately
docker run -d --name mina-node -p 8302:8302 o1labs/mina-rust:v1.4.2
docker run -d --name mina-frontend -p 8070:8070 o1labs/mina-rust-frontend:v1.4.2
```

For complete setup guides, see the
[Node Operators](../node-operators/getting-started) section.
2 changes: 1 addition & 1 deletion website/docs/node-operators/alpha-testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Docker. Follow these steps to set up the node and

Ensure you have **Docker** installed:

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

## 2. Download & Start the Node

Expand Down
2 changes: 1 addition & 1 deletion website/docs/node-operators/archive-node.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ multiple options running simultaneously.
## Prerequisites

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

## Docker compose setup (with archiver process)

Expand Down
2 changes: 1 addition & 1 deletion website/docs/node-operators/block-producer.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ complete.
## Prerequisites

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

## Download & Start the Node

Expand Down
74 changes: 0 additions & 74 deletions website/docs/node-operators/docker-installation.md

This file was deleted.

Loading
Loading