docker

Containerize Go and Rust backends into optimized Docker images with multi-stage builds.

Updated Apr 3, 2026
One-click install
npx skills add https://github.com/matlockx/track-work --skill docker-matlockx
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: docker
Source: https://github.com/matlockx/track-work/tree/main/.agent/skills/docker
Command: npx skills add https://github.com/matlockx/track-work --skill docker-matlockx

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reference for containerizing backend services with Docker, emphasizing production-ready, secure, and optimized image creation.

Core Features & Use Cases

  • Multi-stage build patterns for Go and Rust backends to minimize final image size.
  • Security-focused runtime configurations (non-root users, certs, health checks, and minimal runtimes).
  • Production-ready docker-compose and deployment guidance for local dev and CI/CD pipelines.

Quick Start

Build the production-ready Docker image for your backend service.

Frequently Asked Questions about docker

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a small Docker image for a Go backend?

To create a small Docker image for a Go backend, use multi-stage builds to compile the application and copy only the binary into a minimal runtime image. This approach removes build dependencies and significantly reduces final image size.

How do I configure a non-root user in a Docker container for Rust?

Configuring a non-root user in a Docker container for Rust involves creating a dedicated user in the final stage of your multi-stage build. This secures the runtime by ensuring the application does not execute with root privileges.

What's the best way to set up Docker health checks for containerized microservices?

The best way to set up Docker health checks for containerized microservices is to define them in your Dockerfile using the HEALTHCHECK instruction. This allows the orchestrator to monitor application status and restart unhealthy instances automatically.

Can I use Docker multi-stage builds for local development and CI/CD pipelines?

Yes, you can use Docker multi-stage builds for both local development and CI/CD pipelines. They provide deterministic environments by separating the build environment from the runtime, ensuring consistency across development and production stages.

Why does my Rust Docker image keep failing during the build stage?

A Rust Docker image might fail during the build stage if dependencies are not cached properly or if the base image lacks necessary build tools. Using multi-stage builds with cached dependency layers helps resolve these compilation issues.

Does Docker support optimized containerization for both Go and Rust backends?

Yes, Docker supports optimized containerization for both Go and Rust backends through multi-stage build patterns. This technique minimizes final image size by compiling the backend in an intermediate stage and copying artifacts to a secure, minimal runtime.