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
20 changes: 17 additions & 3 deletions .github/workflows/build-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ permissions:
contents: read
id-token: write

env:
DOCKER_PLATFORMS: linux/amd64,linux/arm64

jobs:
docker-build:
runs-on: warp-ubuntu-latest-x64-8x
Expand All @@ -34,18 +37,29 @@ jobs:
name: Build ${{ matrix.component }}
steps:
- name: Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Prepare image metadata
id: metadata
run: |
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"
echo "version=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Build
uses: WarpBuilds/build-push-action@8c1f3b8bd22c68607865d99ff650d37a564229a5 # v6.0.7
uses: WarpBuilds/build-push-action@ec038a9f4b87a7c7ccb50ac7a26a90d46a610a81 # v6.0.9
with:
context: .
push: false
file: ./Dockerfile
platforms: linux/amd64
platforms: ${{ env.DOCKER_PLATFORMS }}
profile-name: ${{ vars.WARPBUILD_DOCKER_BUILDER_PROFILE }}
pull: true
build-args: |
BIN=${{ matrix.bin }}
PORT=${{ matrix.port }}
CREATED=${{ steps.metadata.outputs.created }}
VERSION=${{ steps.metadata.outputs.version }}
COMMIT=${{ steps.metadata.outputs.commit }}
19 changes: 15 additions & 4 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ on:
env:
version: ${{ inputs.version || github.ref_name }}
registry: ghcr.io
DOCKER_PLATFORMS: linux/amd64,linux/arm64

permissions:
id-token: write
Expand Down Expand Up @@ -46,29 +47,39 @@ jobs:
name: Publish ${{ matrix.component }} ${{ inputs.version }}
steps:
- name: Checkout repo
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
ref: ${{ env.version }}
fetch-depth: 0
persist-credentials: false

- name: Prepare image metadata
id: metadata
run: |
echo "created=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> "$GITHUB_OUTPUT"
echo "commit=$(git rev-parse HEAD)" >> "$GITHUB_OUTPUT"

- name: Log in to the Container registry
uses: docker/login-action@65b78e6e13532edd9afa3aa52ac7964289d1a9c1
uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0
with:
registry: ${{ env.registry }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build and push Docker image
id: push
uses: WarpBuilds/build-push-action@8c1f3b8bd22c68607865d99ff650d37a564229a5 # v6.0.7
uses: WarpBuilds/build-push-action@ec038a9f4b87a7c7ccb50ac7a26a90d46a610a81 # v6.0.9
with:
context: .
push: true
file: ./Dockerfile
platforms: linux/amd64
platforms: ${{ env.DOCKER_PLATFORMS }}
profile-name: ${{ vars.WARPBUILD_DOCKER_BUILDER_PROFILE }}
pull: true
build-args: |
BIN=${{ matrix.bin }}
PORT=${{ matrix.port }}
CREATED=${{ steps.metadata.outputs.created }}
VERSION=${{ env.version }}
COMMIT=${{ steps.metadata.outputs.commit }}
tags: ${{ env.registry }}/0xmiden/miden-${{ matrix.component }}:${{ env.version }}
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
- Fixed trace exports not supporting TLS ([#2199](#https://github.com/0xMiden/node/pull/2199)).
- Updated to protocol v0.15.2 (v0.15.0 and v0.15.1 are yanked) ([#2205](#https://github.com/0xMiden/node/pull/2205)).
- Ensure that the proposed block's validator key matches our own before signing [#2203](https://github.com/0xMiden/node/pull/2203).
- Added `arm64/linux` support to Docker images ((#2209)[https://github.com/0xMiden/node/pull/2209]).

## v0.15.0-rc.0 (2026-06-03)

Expand Down
14 changes: 7 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,21 @@
# syntax=docker/dockerfile:1

ARG RUST_VERSION=1.93
ARG DEBIAN_RELEASE=bookworm
ARG BIN
ARG PORT

FROM rust:1.93-slim-bookworm AS chef
FROM rust:${RUST_VERSION}-slim-${DEBIAN_RELEASE} AS chef
# Install build dependencies. RocksDB is compiled from source by librocksdb-sys.
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y \
apt-get install -y --no-install-recommends \
llvm \
clang \
libclang-dev \
cmake \
pkg-config \
libssl-dev \
libsqlite3-dev \
ca-certificates && \
rm -rf /var/lib/apt/lists/*
RUN cargo install cargo-chef
Expand Down Expand Up @@ -44,12 +45,11 @@ RUN --mount=type=cache,sharing=locked,target=/usr/local/cargo/registry \
mkdir -p /app/bin && \
cp /app/target/release/${BIN} /app/bin/${BIN}

# Base line runtime image with runtime dependencies installed.
FROM debian:bookworm-slim AS runtime-base
# Baseline runtime image with runtime dependencies installed.
FROM debian:${DEBIAN_RELEASE}-slim AS runtime-base
RUN apt-get update && \
apt-get -y upgrade && \
apt-get install -y --no-install-recommends sqlite3 ca-certificates \
&& rm -rf /var/lib/apt/lists/*
rm -rf /var/lib/apt/lists/*

FROM runtime-base AS runtime
ARG BIN
Expand Down
38 changes: 23 additions & 15 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ help:
WARNINGS=RUSTDOCFLAGS="-D warnings"
STRESS_TEST_DATA_DIR ?= stress-test-store-$(shell date +%Y%m%d-%H%M%S)
COMPOSE_FILES = -f docker-compose.yml -f compose/telemetry.yml -f compose/monitor.yml
DOCKER_PLATFORM ?=
DOCKER_PLATFORM_ARG = $(if $(DOCKER_PLATFORM),--platform $(DOCKER_PLATFORM),)
DOCKER_VERSION ?= $(shell awk -F '"' '/^version[[:space:]]*=/ { print $$2; exit }' Cargo.toml)
CONFIG_DIR = .config
README_FILES = $(shell git ls-files '*README.md')
EXTERNAL_DOCS_MARKDOWN_FILES = $(shell git ls-files 'docs/external/**/*.md')
Expand Down Expand Up @@ -194,10 +197,11 @@ docker-build: docker-build-node docker-build-validator docker-build-ntx-builder

.PHONY: docker-build-node
docker-build-node: ## Builds the Miden node using Docker
@CREATED=$$(date) && \
VERSION=$$(cat bin/node/Cargo.toml | grep -m 1 '^version' | cut -d '"' -f 2) && \
@CREATED=$$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
VERSION="$(DOCKER_VERSION)" && \
COMMIT=$$(git rev-parse HEAD) && \
docker build --build-arg CREATED="$$CREATED" \
docker build --pull $(DOCKER_PLATFORM_ARG) \
--build-arg CREATED="$$CREATED" \
--build-arg VERSION="$$VERSION" \
--build-arg COMMIT="$$COMMIT" \
--build-arg BIN=miden-node \
Expand All @@ -206,10 +210,11 @@ docker-build-node: ## Builds the Miden node using Docker

.PHONY: docker-build-validator
docker-build-validator: ## Builds the Miden validator using Docker
@CREATED=$$(date) && \
VERSION=$$(cat bin/validator/Cargo.toml | grep -m 1 '^version' | cut -d '"' -f 2) && \
@CREATED=$$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
VERSION="$(DOCKER_VERSION)" && \
COMMIT=$$(git rev-parse HEAD) && \
docker build --build-arg CREATED="$$CREATED" \
docker build --pull $(DOCKER_PLATFORM_ARG) \
--build-arg CREATED="$$CREATED" \
--build-arg VERSION="$$VERSION" \
--build-arg COMMIT="$$COMMIT" \
--build-arg BIN=miden-validator \
Expand All @@ -218,10 +223,11 @@ docker-build-validator: ## Builds the Miden validator using Docker

.PHONY: docker-build-ntx-builder
docker-build-ntx-builder: ## Builds the Miden network transaction builder using Docker
@CREATED=$$(date) && \
VERSION=$$(cat bin/ntx-builder/Cargo.toml | grep -m 1 '^version' | cut -d '"' -f 2) && \
@CREATED=$$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
VERSION="$(DOCKER_VERSION)" && \
COMMIT=$$(git rev-parse HEAD) && \
docker build --build-arg CREATED="$$CREATED" \
docker build --pull $(DOCKER_PLATFORM_ARG) \
--build-arg CREATED="$$CREATED" \
--build-arg VERSION="$$VERSION" \
--build-arg COMMIT="$$COMMIT" \
--build-arg BIN=miden-ntx-builder \
Expand All @@ -230,10 +236,11 @@ docker-build-ntx-builder: ## Builds the Miden network transaction builder using

.PHONY: docker-build-monitor
docker-build-monitor: ## Builds the network monitor using Docker
@CREATED=$$(date) && \
VERSION=$$(cat bin/network-monitor/Cargo.toml | grep -m 1 '^version' | cut -d '"' -f 2) && \
@CREATED=$$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
VERSION="$(DOCKER_VERSION)" && \
COMMIT=$$(git rev-parse HEAD) && \
docker build --build-arg CREATED="$$CREATED" \
docker build --pull $(DOCKER_PLATFORM_ARG) \
--build-arg CREATED="$$CREATED" \
--build-arg VERSION="$$VERSION" \
--build-arg COMMIT="$$COMMIT" \
--build-arg BIN=miden-network-monitor \
Expand All @@ -242,10 +249,11 @@ docker-build-monitor: ## Builds the network monitor using Docker

.PHONY: docker-build-remote-prover
docker-build-remote-prover: ## Builds the remote prover using Docker
@CREATED=$$(date) && \
VERSION=$$(cat bin/remote-prover/Cargo.toml | grep -m 1 '^version' | cut -d '"' -f 2) && \
@CREATED=$$(date -u +'%Y-%m-%dT%H:%M:%SZ') && \
VERSION="$(DOCKER_VERSION)" && \
COMMIT=$$(git rev-parse HEAD) && \
docker build --build-arg CREATED="$$CREATED" \
docker build --pull $(DOCKER_PLATFORM_ARG) \
--build-arg CREATED="$$CREATED" \
--build-arg VERSION="$$VERSION" \
--build-arg COMMIT="$$COMMIT" \
--build-arg BIN=miden-remote-prover \
Expand Down
3 changes: 3 additions & 0 deletions docs/external/src/local-network-development.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ Build the images after checkout or whenever you need fresh local images. The loc
# Build the Docker images used by the local network.
make local-network-build

# Optionally build for a specific Docker platform.
make local-network-build DOCKER_PLATFORM=linux/arm64

# Start the local network.
make local-network-up

Expand Down
2 changes: 2 additions & 0 deletions docs/external/src/network-operator/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,6 @@ You can also build images locally from a repository checkout:
make docker-build
```

Use `DOCKER_PLATFORM=linux/amd64` or `DOCKER_PLATFORM=linux/arm64` to build a specific local image platform.

<!-- markdownlint-enable MD033 MD041 -->
Loading