Skip to content

Conversation

@zerg-su
Copy link
Contributor

@zerg-su zerg-su commented Oct 3, 2025

  • Add Dockerfile with 2-stage build (builder and runtime)
  • Add Dockerfile.runtime for fast runtime-only rebuilds
  • Update Makefile with Docker build targets (docker_build_builder, docker_build_runtime, docker_build_all)
  • Install Rust via rustup in init.sh script instead of apt
  • Add RUST_VERSION to .env configuration
  • Update CI workflow to cache Rust via rustup
  • Configure vcpkg caching with BuildKit mount
  • Fix library and module paths in runtime stage
  • Set --modules-dir in ENTRYPOINT for convenience

- Add Dockerfile with 2-stage build (builder and runtime)
- Add Dockerfile.runtime for fast runtime-only rebuilds
- Update Makefile with Docker build targets (docker_build_builder, docker_build_runtime, docker_build_all)
- Install Rust via rustup in init.sh script instead of apt
- Add RUST_VERSION to .env configuration
- Update CI workflow to cache Rust via rustup
- Configure vcpkg caching with BuildKit mount
- Fix library and module paths in runtime stage
- Set --modules-dir in ENTRYPOINT for convenience
@zerg-su zerg-su requested review from kamilsa and xDimon October 3, 2025 00:10
zerg-su added 9 commits October 26, 2025 14:11
# Conflicts:
#	.ci/scripts/init.sh
#	Dockerfile
#	Makefile
- Introduced a three-stage Docker build process: dependencies, builder, and runtime.
- Created Dockerfiles for each stage: Dockerfile.dependencies, Dockerfile.builder, and Dockerfile.runtime.
- Updated Makefile with new targets for building and managing Docker images.
- Added .dockerignore to exclude unnecessary files from Docker context.
- Enhanced README and added DOCKER_BUILD.md for detailed build instructions and CI/CD integration.

This structure improves build efficiency and reduces image sizes for production.
- Renamed and reorganized Makefile targets for clarity, introducing `docker_build` for fast code rebuilds and `docker_push` for pushing all images.
- Updated README and DOCKER_BUILD.md to reflect new commands and usage instructions, enhancing clarity for CI/CD integration.
- Improved Docker image management by consolidating push commands and cleaning up unnecessary targets.
- Adjusted build times in documentation to provide accurate estimates.

These changes streamline the Docker workflow and improve user experience.
- Updated Dockerfile configurations to use 'latest' tags for dependencies and builder images, improving consistency and clarity.
- Optimized runtime image by stripping binaries and reducing size, resulting in a production image of approximately 240 MB.
- Enhanced README and DOCKER_BUILD.md with detailed instructions on image tagging and pushing, including examples for custom and latest tags.
- Improved Makefile to support flexible tagging and streamlined push commands for Docker images.

These changes improve the efficiency of the Docker workflow and provide clearer guidance for users.
- Added detailed instructions for managing Docker dependencies, including tagging and pushing images with custom and latest tags.
- Updated Makefile to support a default dependencies tag and improved clarity in image tagging for builder and runtime stages.
- Enhanced README and DOCKER_BUILD.md to reflect new tagging strategies and best practices for dependency management.

These changes improve the usability and clarity of the Docker build process for developers.
- `qlean-mini:latest` - runtime image (~240 MB, production)

**When to rebuild dependencies:**
- `vcpkg.json` or `vcpkg-configuration.json` changes (new libraries)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should dependencies be rebuilt dew vcpkg-overlay's content changed?

make docker_build_all

# AMD64 / x86_64
make docker_build_all DOCKER_PLATFORM=linux/amd64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make docker_build_all DOCKER_PLATFORM=linux/amd64
DOCKER_PLATFORM=linux/amd64 make docker_build_all

make docker_manifest_create # Create unified manifest

# Run on specific platform
make docker_run DOCKER_PLATFORM=linux/amd64 ARGS='--version'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
make docker_run DOCKER_PLATFORM=linux/amd64 ARGS='--version'
DOCKER_PLATFORM=linux/amd64 ARGS='--version' make docker_run

**Utility:**
```bash
make docker_run # Run node
make docker_run ARGS='--version'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm confused. Some data provided as env-vars, another as args. Please, ensure if all provides right, please.

@zerg-su zerg-su closed this Dec 2, 2025
@zerg-su zerg-su deleted the ci/docker branch December 2, 2025 12:44
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.

3 participants