dockerfile-slim

by AgentsRoomVerified by AgentsRoomNo install yetNo like yetUpdated May 7, 2026Category: Engineering

What it does

Use when writing a Dockerfile. Multi-stage build, slim base image, non-root user, sensible CMD/ENTRYPOINT split.

Install opens this entry in your AgentsRoom desktop app. If the app is not installed yet, you will be sent to the download page.

SKILL.md

---
name: dockerfile-slim
description: Use when writing a Dockerfile. Multi-stage build, slim base image, non-root user, sensible CMD/ENTRYPOINT split.
---

# Dockerfile slim

When writing a Dockerfile:

1. Multi-stage: `builder` (full image) → `runner` (slim/distroless).
2. Pin the base image (`node:20.11-slim`, not `node:slim`).
3. Run as non-root: `USER node` (or create a `app` user).
4. Don't copy `node_modules` from host. Copy `package*.json` first, install, then copy source — leverage layer cache.
5. `HEALTHCHECK` if the service is long-lived; sensible `EXPOSE`.

Tags

devopsdocker

Further reading

Download AgentsRoom

Run all your AI agents, on all your projects, from a single window.

FreeDownload AgentsRoom

Companion app: monitor your agents on the go

Bring your own: Claude, Codex, Antigravity CLI, or other AI provider.

Get the extension
Chrome Web Store

Push bugs and requests straight to your public backlog.

A glimpse of AgentsRoom in action.

Multiple projects
Multi-provider
Multiple agents
Live status
File diff & commit
Mobile companion
Live preview
Agent teams
Browser automation
Backlog-driven dev
Prompt Library
Skills Library
View all features