Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Docker guidance — Dockerfile best practices, multi-stage builds, Compose, networking, volumes, and image security.
中文简介正在准备中。当前显示原文说明。
查看安装方法安装前可以查看交给 AI 代理的指令内容。
Docker packages applications and their dependencies into portable images that run identically anywhere the Docker runtime exists. Containers are the unit of deployment for modern infrastructure — understanding images, layers, networking, and volumes is prerequisite knowledge for Kubernetes, CI/CD, and cloud platforms.
The common failure mode is treating Dockerfiles as an afterthought: bloated images, leaked secrets, and containers that work on a laptop but die in production. This skill covers writing production-grade Dockerfiles, using Compose for local development, and the security and operational practices that matter.
alpine, distroless, or -slim variants over full OS images. Smaller images pull faster, have fewer CVEs, and reduce attack surface. Distroless goes further: no shell, no package manager..dockerignore. Like .gitignore for the build context — exclude .git, node_modules, build artifacts, secrets. A bloated context slows every build and can leak files into images.USER it. Root-in-container is still root-adjacent on the host if there's a breakout; non-root is cheap defense in depth.exec form CMD so signals propagate). Sidecars and init systems are orchestrator concerns, not image concerns.RUN --mount=type=cache for package managers avoids re-downloading dependencies every build.--mount=type=secret), SSH mounts. Enable it; the legacy builder is obsolete.COPY .env or ARG secrets persist in image history. Use BuildKit secret mounts or multi-stage builds that don't copy secrets into the final stage.HEALTHCHECK instruction so orchestrators know when the app is actually ready — not just when the process started..env support keep dev/prod parity without production complexity.latest) only for convenience. Deployments should reference immutable digests or SHA tags — latest in production is undebuggable.FROM node:22-slim AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN --mount=type=cache,target=/root/.npm npm ci
build and runtime stages; copy only artifacts forward; final stage minimal.
FROM deps AS build
COPY . .
RUN npm run build
FROM node:22-slim AS runtime
WORKDIR /app
COPY --from=build /app/dist ./dist
COPY --from=deps /app/node_modules ./node_modules
RUN useradd -r app && chown -R app:app /app
USER app
CMD ["node", "dist/index.js"]
.dockerignore. Exclude .git, node_modules, *.md, local env files, and test artifacts — everything not needed at runtime.RUN --mount=type=secret,id=npmrc npm ci keeps tokens out of layers; never COPY credential files.HEALTHCHECK --interval=30s --timeout=3s CMD wget -qO- http://localhost:3000/health || exit 1
compose.yaml; named volumes for databases; bind mounts for code; override files for local tweaks.
services:
app:
build: .
ports: ["3000:3000"]
volumes: ["./src:/app/src"]
depends_on: { db: { condition: service_healthy } }
db:
image: postgres:16
volumes: ["pgdata:/var/lib/postgresql/data"]
volumes: { pgdata: {} }
--privileged without justification.COPY .env or ARG credentials persist in history; use secret mounts.COPY . before npm ci invalidates the dependency layer on every code change; copy lockfiles first..dockerignore — slow builds and leaked files; always define it.CMD npm start wraps in sh, breaking signal propagation; use exec form ["npm", "start"].latest in production — undebuggable deploys; pin immutable tags or digests.--read-only with tmpfs for scratch space.还没有评价。欢迎分享你的使用感受。
无需登录即可发表。欢迎分享使用感受、提问,或说明在哪些环境下无法运行。
还没有评论。来写第一条吧。
Master 1Password: vaults, Watchtower, passkeys, SSH agent, CLI, and family/team administration. Use when getting full value from 1Password personally or administering it for others.
中文简介正在准备中。当前显示原文说明。
Create 3D visuals with modeling, texturing, lighting, rendering, and optimization for web and product.
中文简介正在准备中。当前显示原文说明。
Create 3D web experiences: scene setup, models, materials, lighting, animation, scroll-driven scenes, and performance budgets. Use when adding 3D to websites beyond basic demos.
中文简介正在准备中。当前显示原文说明。
Writing abstracts that get papers read — structured content, the 5-sentence core, and journal-specific constraints.
中文简介正在准备中。当前显示原文说明。
Learn effectively from courses and academies: choosing programs, studying actively, and converting courses into skills. Use when investing time/money in structured learning.
中文简介正在准备中。当前显示原文说明。
Audit designs for accessibility with WCAG checklists covering color, type, focus, motion, and content.
中文简介正在准备中。当前显示原文说明。