For Go API please follow the recommendations in ./references/go-api-dockerfile.md
For Frontend applications follow the recommendations in ./references/frontend-dockerfile.md
Dockerfile Performance
Layer Caching:
Copy dependency files first (go.mod, package.json)
Run dependency download before copying source
Order COPY commands from least to most frequently changed
Build Optimization:
Use multi-stage builds
Minimize number of layers
Combine RUN commands where appropriate
Development Speed:
Provide Dockerfile_localbuild for fast iteration
Use volume mounts for live reload
Implement proper healthchecks
Docker-compose.yml
Omit version field (recommended) or use version: '3.9'
Use services: as top-level key
Standard Service Patterns
For MariaDB service read ./references/mariadb-docker-compose-service.md
For Oracle service read ./references/oracle-docker-compose-service.md
For Go API service read ./references/go-api-docker-compose-service.md
For Frontend service read ./references/frontend-docker-compose-service.md
Verification and Troubleshooting
Before completing any task, run through ./references/verification-checklist.md.
For build/runtime/permission issues, consult ./references/troubleshooting.md.
Image tag: use explicit version number instead of 'latest'
Service names: descriptive and consistent
Documentation:
Comment architecture-specific choices
Document environment variables
Provide usage examples in README
Variants:
Dockerfile - Production with multi-stage build
Dockerfile_localbuild - Local development (pre-built binary)
Dockerfile_test - Testing environment
docker-compose.yml - Main composition
docker-compose.override.yml - Local overrides
docker-compose-test.yml - Test environment
docker-compose-prod.yml - Production settings
1---2name: 10x-docker3description: 10x Docker4---5# 10x Docker 67## Dockerfile89For Go API please follow the recommendations in ./references/go-api-dockerfile.md10For Frontend applications follow the recommendations in ./references/frontend-dockerfile.md1112### Dockerfile Performance13141. **Layer Caching:**15 - Copy dependency files first (go.mod, package.json)16 - Run dependency download before copying source17 - Order COPY commands from least to most frequently changed18192. **Build Optimization:**20 - Use multi-stage builds21 - Minimize number of layers22 - Combine RUN commands where appropriate23243. **Development Speed:**25 - Provide Dockerfile_localbuild for fast iteration26 - Use volume mounts for live reload27 - Implement proper healthchecks2829## Docker-compose.yml3031- Omit version field (recommended) or use `version: '3.9'`32- Use `services:` as top-level key3334### Standard Service Patterns3536For MariaDB service read ./references/mariadb-docker-compose-service.md37For Oracle service read ./references/oracle-docker-compose-service.md38For Go API service read ./references/go-api-docker-compose-service.md39For Frontend service read ./references/frontend-docker-compose-service.md4041### Verification and Troubleshooting4243Before completing any task, run through `./references/verification-checklist.md`.44For build/runtime/permission issues, consult `./references/troubleshooting.md`.4546### Volumes4748**Common Volume Patterns:**491. **Init Scripts:** `./conf/docker/initdb:/docker-entrypoint-initdb.d`502. **Configuration:** `./conf/docker/mariadb.cnf:/etc/mysql/mariadb.cnf`513. **Environment:** `./env.sample:/home/dinfo/conf/.env`524. **Logs:** `/tmp/logs:/tmp/logs`535. **Runtime Config:** `./conf/docker/environment.json:/usr/share/nginx/html/assets/environments/environment.json`5455### Ports5657**Standard Port Mappings:**58- Application APIs: `8080:8080`59- MariaDB: `23306:3306` (non-conflicting external port)60- Oracle: `1521:1521`, `5500:5500`61- PostgreSQL: `25432:5432`6263### Networks64- Use default network for simple setups65- Explicit networks only when needed for isolation6667## Environment Variables6869**Naming Convention:**70- UPPERCASE with underscores71- Prefixed with component name (e.g., `MARIADB_`, `ORACLE_`)72- Use `.env` files for sensitive data (not committed)73- Use `env.sample` as template7475**Common Variables:**76- `MARIADB_ROOT_PASSWORD`, `MARIADB_DATABASE`, `MARIADB_USER`, `MARIADB_PASSWORD`77- `TZ=Europe/Zurich`78- `DOCKERFILE` for build variant selection7980## Best Practices8182### Security83841. **Non-root User:**85 - Always run as non-root (USER 1001)86 - Create dedicated user/group87 - Set proper permissions for K8S compatibility88892. **Minimal Images:**90 - Use alpine or slim variants when possible91 - Multi-stage builds to reduce final image size92933. **Secrets Management:**94 - Never commit passwords in docker-compose.yml95 - Use environment variables96 - Provide env.sample templates97 - Use Docker secrets for production9899100### Maintainability1011021. **Naming:**103 - Container names: `project-component` (e.g., `persons-api`, `persons-db`)104 - Image names: match container names105 - Image tag: use explicit version number instead of 'latest'106 - Service names: descriptive and consistent1071082. **Documentation:**109 - Comment architecture-specific choices110 - Document environment variables111 - Provide usage examples in README1121133. **Variants:**114 - `Dockerfile` - Production with multi-stage build115 - `Dockerfile_localbuild` - Local development (pre-built binary)116 - `Dockerfile_test` - Testing environment117 - `docker-compose.yml` - Main composition118 - `docker-compose.override.yml` - Local overrides119 - `docker-compose-test.yml` - Test environment120 - `docker-compose-prod.yml` - Production settings121
Run npx skillmds@latest add arhuman/10x-docker in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
10x Docker It is listed under DevOps & Infra on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
arhuman (@arhuman) published this skill. Their other Agent Skills are listed on their SkillMD profile.