Agent skill
docker-4-networking-patterns
Sub-skill of docker: 4. Networking Patterns (+1).
Install this agent skill to your Project
npx add-skill https://github.com/vamseeachanta/workspace-hub/tree/main/.claude/skills/_archive/operations/devtools/docker/4-networking-patterns
SKILL.md
4. Networking Patterns (+1)
4. Networking Patterns
Custom Network Configuration:
version: '3.8'
services:
frontend:
build: ./frontend
networks:
- frontend-network
backend:
build: ./backend
networks:
- frontend-network
- backend-network
db:
image: postgres:16-alpine
networks:
- backend-network
networks:
frontend-network:
driver: bridge
backend-network:
driver: bridge
internal: true # No external access
Network Commands:
# List networks
docker network ls
# Inspect network
docker network inspect app-network
# Create custom network
docker network create --driver bridge my-network
# Connect container to network
docker network connect my-network container-name
# Disconnect container
docker network disconnect my-network container-name
5. Volume Management
Volume Types and Usage:
version: '3.8'
services:
app:
image: myapp:latest
volumes:
# Named volume (managed by Docker)
- app_data:/app/data
# Bind mount (host directory)
- ./config:/app/config:ro
# Anonymous volume (for excluding from bind mount)
- /app/node_modules
# tmpfs mount (in-memory)
- type: tmpfs
target: /app/tmp
tmpfs:
size: 100M
volumes:
app_data:
driver: local
driver_opts:
type: none
device: /data/app
o: bind
Volume Commands:
# List volumes
docker volume ls
# Create volume
docker volume create my-volume
# Inspect volume
docker volume inspect my-volume
# Remove unused volumes
docker volume prune
# Backup volume
docker run --rm -v my-volume:/data -v $(pwd):/backup alpine \
tar czf /backup/volume-backup.tar.gz -C /data .
# Restore volume
docker run --rm -v my-volume:/data -v $(pwd):/backup alpine \
tar xzf /backup/volume-backup.tar.gz -C /data
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
gsd-complete-milestone
Archive completed milestone and prepare for next version
gsd-reapply-patches
Reapply local modifications after a GSD update
gsd-verify-work
Validate built features through conversational UAT
gsd-thread
Manage persistent context threads for cross-session work
clinical-trial-protocol
Generate clinical trial protocols for medical devices or drugs through a modular, waypoint-based architecture with research-only and full protocol modes.
single-cell-rna-qc
Performs quality control on single-cell RNA-seq data (.h5ad or .h5 files) using scverse best practices with MAD-based filtering and comprehensive visualizations.
Didn't find tool you were looking for?