Sign inSign up

mbround18/cargo-make

By mbround18

Updated about 1 year ago

Cargo make cli encapsulated in an isolated image allowing you to build off of it easily.

Image
Languages & frameworks
Integration & delivery
0

5.3K

mbround18/cargo-make repository overview

docker-cargo-make

Docker Pulls GitHub Release License: MIT

A lightweight Docker image containing cargo-make, a powerful build tool and task runner for Rust projects. This container provides an easy way to use cargo-make in CI/CD pipelines and development environments without local installation.

Features

  • 🚀 Pre-built cargo-make binary ready to use
  • 🐳 Minimal Docker image for efficient CI/CD
  • 🔄 Automated synchronization with cargo-make releases
  • 📦 Multi-architecture support

Quick Start

Using in Dockerfile
FROM rust:1.88 as builder
WORKDIR /app
COPY . .
COPY --from=mbround18/cargo-make /usr/local/bin/cargo-make /usr/local/cargo/bin/
RUN cargo make build
Running Directly
# Pull and run a specific version
docker run --rm mbround18/cargo-make:0.37.20 cargo make --version

# Run cargo-make commands directly
docker run --rm -v $(pwd):/workspace -w /workspace mbround18/cargo-make cargo make build

# Interactive shell with cargo-make available
docker run --rm -it -v $(pwd):/workspace -w /workspace mbround18/cargo-make sh

Development Tools

This repository includes automation tools for maintaining zthe Docker images:

Available Commands
CommandDescription
inv diffCompare GitHub releases with Docker Hub tags
inv syncBuild and push missing Docker images (up to 4 concurrent workers)
inv sync --replace VERSIONRebuild and push a specific version
inv sync --replace allRebuild and push all versions
Usage
# Show version differences between GitHub and Docker Hub
inv diff

# Sync missing versions to Docker Hub
inv sync

# Rebuild a specific version
inv sync --replace 0.37.20

# Rebuild all versions
inv sync --replace all
Requirements
  • Docker daemon running and configured
  • Docker Hub credentials configured for pushing
  • Internet connection for GitHub API and Docker Hub access

Examples

Basic Build Task
FROM mbround18/cargo-make:latest as make
FROM rust:1.88 as builder

WORKDIR /app
COPY . .
COPY --from=make /usr/local/bin/cargo-make /usr/local/cargo/bin/

RUN cargo make ci-flow
Multi-stage Build with Tests
FROM mbround18/cargo-make:latest as make
FROM rust:1.88 as builder

WORKDIR /app
COPY . .
COPY --from=make /usr/local/bin/cargo-make /usr/local/cargo/bin/

# Run tests and build
RUN cargo make test
RUN cargo make build --release

FROM debian:bookworm-slim
COPY --from=builder /app/target/release/myapp /usr/local/bin/
CMD ["myapp"]

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests.

For issues related to cargo-make functionality, please report them to the cargo-make repository.

For issues specific to this Docker container, please use this repository's issue tracker.

License

This project is licensed under the MIT License - see the LICENSE file for details.

References

Tag summary

Content type

Image

Digest

sha256:d7d37d6aa

Size

218.8 MB

Last updated

about 1 year ago

docker pull mbround18/cargo-make:0.37.23