Pradumna Saraf

@pradumnasaraf.dev

Open Source Developer | Docker Captain | Microsoft MVP | DevOps | Owner @rebasemedia All my links: https://links.pradumnasaraf.dev

This book is different from any other one I've read. Recently, I was one of the technical reviewers for the book "Operational AI with Docker". This was my first time reviewing a book, and I loved it. There's something special about being part of a book from the early idea stage, watching it..

BildBild

Excited to share that I've been renewed as a Docker Captain! 🐳 It's been a crazy journey; learned a ton and made some great new friends along the way. Huge thanks to Eva and the Docker team (@docker.com), and the incredible Docker community for the continued trust and support.

A person wearing a captain's hat smiles at the camera. Text reads "Docker Captain 2026" with Docker logo and message about being awarded another year as Docker Captain.

The Docker Compose environment variable support goes beyond just ${VAR}. Useful when you want safer configurations without hardcoding values. `:-` → use a default value (optional configuration) `:?` → stop with an error message (required values like secrets) @docker.com

A compose.yml file with example Docker Compose service configuration, including environment variables and default values with comments.

Meet Pradumna Saraf. Docker Captain. Open source advocate. Community builder. In this spotlight, he shares his journey into containers and cloud-native, and what keeps him excited about the future of development. Read more: https://bit.ly/46WNUjF

In Docker Compose, you can use `cache_from` in the `build` section to reuse layers from an existing image and speed up builds This is especially useful in CI environments where a local build cache doesn’t exist. @docker.com

The code block window titled "compose.yml" shows YAML code for a Docker service. It features build context, Dockerfile, and cache settings.

Play with Docker is now deprecated and no longer available. If you’re looking for a simple browser-based Docker playground, you can use LabSpaces instead. It will spin up environments instantly and experiment with Docker without installing anything locally. @docker.com

Bild

If you are repeating the same config and environment variables across multiple Docker Compose files, use YAML anchors. You can define the config once and reuse it everywhere. This keeps your compose files cleaner, easier to update, and more maintainable. @docker.com

A dark-themed code editor displays a `compose.yml` file, which defines three Docker Compose services: `api`, `worker`, and `scheduler`. All three services share the same configuration for `image: myapp:latest`, `restart: unless-stopped`, `volumes: - .:/app`, and environment variables `NODE_ENV: production` and `LOG_LEVEL: info`. Their unique commands are `npm run api`, `npm run worker`, and `npm run scheduler`, respectively. A large red 'X' graphic is prominently featured in the top right corner of the editor window.A dark-themed code editor displays a Docker Compose file named `compose.yml`. The file defines a reusable `x-common` configuration block, which includes `restart: unless-stopped`, a volume mount of `.:/app`, and environment variables `NODE_ENV: production` and `LOG_LEVEL: info`. Below this, three services are defined: `api`, `worker`, and `scheduler`. Each service uses `myapp:latest` as its image, merges the `*common` configuration, and has a unique `npm run` command (e.g., `npm run api` for the api service). A prominent green checkmark icon is positioned in the top right corner of the window.

Did you know Docker Compose has profiles? You can keep heavy services like Prometheus and Grafana turned off by default, and only start them when you actually need monitoring. You can start them by running: docker compose --profile monitoring up @docker.com

Screenshot of a `compose.yml` file showing Docker Compose services with profiles. The `app` service runs by default, while `prometheus` and `grafana` services are configured with a `monitoring` profile and only run when that profile is enabled.