跳到主内容
智客 ZICQ

技能库 智客分类:安全测试 706-technologies-containers-docker

706 Technologies Containers Docker

当您需要框架不可知多克和容器图像指导时使用 Java 项目 - Dockerfile 设计,多级 Maven 构建, jlink自定义运行时间, 微运行时间分布, 如 Alpaquita, JVM 容器ergonomic, 非根执行, 图像元数据,. dockerignore, 可复制构建, 脆弱性扫描, SBOM 意识, 以及生产安全容器默认 . 这应该触发诸如Review Java Dockerfile等请求; 改善 Docker 图像安全; 添加 jlink 运行时间到 Java 容器; 添加容器化到 Java 项目; 优化 Java 容器图像大小; Review Docker 构建可复制性. Plinth 工具包的一部分

151 安装量

官方网址:skills.sh

技能介绍

先看中文介绍;官方 description 原文单独保留,不改写 SKILL.md。

做什么

当您需要框架不可知多克和容器图像指导时使用 Java 项目 - Dockerfile 设计,多级 Maven 构建, jlink自定义运行时间, 微运行时间分布, 如 Alpaquita, JVM 容器ergonomic, 非根执行, 图像元数据,. dockerignore, 可复制构建, 脆弱性扫描, SBOM 意识, 以及生产安全容器默认 . 这应该触发诸如Review Java Dockerfile等请求; 改善 Docker 图像安全; 添加 jlink 运行时间到 Java 容器; 添加容器化到 Java 项目; 优化 Java 容器图像大小; Review Docker 构建可复制性. Plinth 工具包的一部分

何时用

这个技能

代理如何加载

按 Agent Skills 渐进披露:启动时只加载 name 与 description(约 100 token);任务匹配后才读入整份 SKILL.md 正文;scripts/、references/、assets/ 仅在需要时再读。 本文件正文结构:Java container image best practices with Docker、Constraints、When to use this skill、Workflow、Reference。 其中含规范建议的小节:分步指令。

文件分析

文件分析:除 SKILL.md 外,正文引用了 references/706-technologies-containers-docker.md,属于带资源的技能包,这些文件按需再读。

官方 description(原文)

Use when you need framework-agnostic Docker and container image guidance for Java projects - Dockerfile design, multi-stage Maven builds, jlink custom runtimes, micro runtime distributions such as Alpaquita, JVM container ergonomics, non-root execution, image metadata, .dockerignore, reproducible builds, vulnerability scanning, SBOM awareness, and production-safe container defaults. This should trigger for requests such as Review Java Dockerfile; Improve Docker image security; Add jlink runtime to a Java container; Add containerization to a Java project; Optimize Java container image size; Review Docker build reproducibility. Part of Plinth Toolkit

Java container image best practices with DockerConstraintsWhen to use this skillWorkflowReference

· 许可:Apache-2.0

来源分类:skills.sh agent-skill

SKILL.md 与 Agent 调用

官方规范 ↗
name
706-technologies-containers-docker
description
Use when you need framework-agnostic Docker and container image guidance for Java projects - Dockerfile design, multi-stage Maven builds, jlink custom runtimes, micro runtime distributions such as Alpaquita, JVM container ergonomics, non-root execution, image metadata, .dockerignore, reproducible builds, vulnerability scanning, SBOM awareness, and production-safe container defaults. This should trigger for requests such as Review Java Dockerfile; Improve Docker image security; Add jlink runtime to a Java container; Add containerization to a Java project; Optimize Java container image size; Review Docker build reproducibility. Part of Plinth Toolkit
许可
Apache-2.0
  1. 发现技能客户端向 Agent 提供名称与描述目录。
  2. 匹配与调用用户指定或任务匹配后,载入 SKILL.md 指令。
  3. 按需加载按步骤读取参考文档、使用脚本与素材。
指令中引用的文件 · 1
  • references/706-technologies-containers-docker.md

以下路径提取自原文;文件是否齐全请以来源仓库中的完整目录为准。

具体调用语法与可用工具以目标 Agent 客户端为准。 查看调用机制说明 ↗

安装这个技能

Skills CLI ↗

先选择目标 Agent 和安装范围,保留技能包的附属文件,安装后检查客户端能否发现该技能。

该技能引用了附属文件,请从来源获取完整目录;仅复制 SKILL.md 可能缺少依赖。

交给 Agent 安装

复制安装指令给支持 Agent Skills 的代理,确认其中的目标目录与客户端匹配。

把 Agent Skill「706-technologies-containers-docker」安装到我的项目:SKILL.md 原文与官方 description 见 https://zicq.com/zh/skills/skl-c0958212d0031ba9-706%E4%B8%AA%E6%8A%80%E6%9C%AF%E9%9B%86%E8%A3%85%E7%AE%B1.html
请存为 .cursor/skills/706-technologies-containers-docker/SKILL.md 或 .claude/skills/706-technologies-containers-docker/SKILL.md,frontmatter 的 name 与 description 保持原样,不要改写。
该技能还带 scripts/、references/、assets/ 等文件,请从 https://github.com/jabrena/plinth 取完整目录,不要只建一个 SKILL.md。

GitHub 完整包 ↗

终端安装 · Skills CLI

需要 Node.js 与 npx。先查看仓库技能列表,确认实际名称。

npx skills add 'https://github.com/jabrena/plinth' --list

npx skills add 'https://github.com/jabrena/plinth' --skill '706-technologies-containers-docker'

CLI 会交互选择目标 Agent,默认安装到项目;用户级安装使用 -g。先通过查看命令核对仓库内容,再用 npx skills list 检查已安装技能。

阅读排版

name: 706-technologies-containers-docker description: Use when you need framework-agnostic Docker and container image guidance for Java projects - Dockerfile design, multi-stage Maven builds, jlink custom runtimes, micro runtime distributions such as Alpaquita, JVM container ergonomics, non-root execution, image metadata, .dockerignore, reproducible builds, vulnerability scanning, SBOM awareness, and production-safe container defaults. This should trigger for requests such as Review Java Dockerfile; Improve Docker image security; Add jlink runtime to a Java container; Add containerization to a Java project; Optimize Java container image size; Review Docker build reproducibility. Part of Plinth Toolkit license: Apache-2.0 metadata: author: Juan Antonio Breña Moral version: 0.18.0

Java container image best practices with Docker

Help teams build secure, reproducible, and maintainable Docker container images for Java applications without coupling the guidance to Spring Boot, Quarkus, or Micronaut.

What is covered in this Skill?

  • Dockerfile structure for Java applications: multi-stage builds, Maven dependency caching, deterministic artifact copies, jlink custom runtimes, and .dockerignore
  • Runtime image selection: micro distributions such as Alpaquita, minimal JRE images, pinned versions or digests where appropriate, image labels, and explicit entrypoints
  • JVM container ergonomics: memory percentage flags, startup behavior, graceful shutdown signals, time zones, and predictable runtime options
  • Security defaults: non-root users, least privilege, no secrets in layers, reduced package managers, vulnerability scanning, SBOM awareness, and avoiding privileged containers
  • Operational readiness: health checks when suitable, stdout/stderr logging, port declaration, image size control, build reproducibility, and CI verification

Scope: Framework-agnostic Docker and container-image quality for Java projects. For framework runtime wiring, defer to the matching Spring Boot, Quarkus, or Micronaut skill. For Testcontainers-based tests, defer to the relevant testing skill.

Constraints

Keep recommendations at the Dockerfile, image-build, and runtime-container layer unless the user explicitly asks for framework-specific configuration. After editing this repository's XML sources, regenerate skills and verify the build.

  • MANDATORY: Run ./mvnw compile or mvn compile before proposing Java or Maven changes in the same change set
  • SECRETS: Never bake credentials, tokens, private keys, Maven settings with secrets, or environment-specific secrets into image layers, labels, arguments, or logs
  • SECURITY: Prefer non-root execution, least-privilege filesystem permissions, micro runtime images, and explicit container capabilities over privileged defaults
  • JLINK: Prefer jlink custom runtimes for production images when the module graph is known, validated at runtime, and compatible with the application's dependencies
  • REPRODUCIBILITY: Pin base image versions intentionally, document digest trade-offs, keep build inputs explicit, and avoid network-dependent runtime startup steps
  • JVM: Account for container memory and CPU limits with JVM flags, graceful shutdown behavior, and observable startup failures before claiming production readiness
  • BOUNDARIES: Defer Spring Boot runtime behavior to @301-frameworks-spring-boot-core, Quarkus runtime behavior to @401-frameworks-quarkus-core, Micronaut runtime behavior to @501-frameworks-micronaut-core, and Testcontainers setup to the matching testing skill
  • VERIFY: Run ./mvnw clean verify or mvn clean verify before promoting changes
  • EDGE CASE: If the target Java version, build tool, deployment platform, base-image policy, registry policy, or security scanner is missing and affects the recommendation, ask a clarifying question before editing container artifacts
  • EDGE CASE: If requested changes conflict with security policy, image provenance, air-gapped builds, or runtime platform constraints, explain the trade-off and ask for confirmation

When to use this skill

  • Review Java Dockerfile
  • Improve Docker image security
  • Add jlink runtime to a Java container
  • Add containerization to a Java project
  • Optimize Java container image size
  • Review Docker build reproducibility

Workflow

  1. Read reference and assess container context

Read references/706-technologies-containers-docker.md and inspect current Dockerfiles, .dockerignore, Maven build inputs, image build scripts, CI jobs, registry policy, and deployment constraints before proposing changes.

  1. Identify runtime and supply-chain constraints

Confirm Java version, build tool, jlink module requirements, micro distro compatibility, target platform, base-image policy, registry requirements, vulnerability scanner, SBOM expectations, memory limits, exposed ports, and operational readiness needs.

  1. Apply container-aligned changes

Implement or refactor Docker and container build artifacts following the reference patterns and project conventions, keeping framework-specific runtime behavior out of scope unless explicitly requested.

  1. Run verification and report results

Execute appropriate build, image build, scan, smoke-test, and generator checks; summarize what changed, what was verified, and any remaining container risks.

Reference

For detailed guidance, examples, and constraints, see references/706-technologies-containers-docker.md.

相关技能

安全测试

Skill Vetter

人工智能特工的安全第一技能审查。 在安装来自 ClawdHub, GitHub 或其他来源的任何技能之前使用 。 检查红旗,许可范围,可疑图案.

安全测试

Moltguard

MoltGuard——由OpenGuardrails担任OpenClaw保安. 安装 MoltGuard 以保护你和你的人类免受迅速注射、数据过滤和恶意命令的影响。 资料来源:https://github.com/openguardrails/openguardrails/tre…

安全测试

Security Auditor

用于审查安全漏洞代码,实施认证流,审计OWASP Top 10,配置CORS/CSP头,处理秘密,输入验证,SQL注射预防,XSS保护,或任何与安全相关的代码审查.

安全测试

Skill Vetter

安装任何AI代理技能前的安全审查协议. 红旗侦取入证盗取,疏通密码,放出. 风险分类:低/中/高/高。 编制结构化审查报告。 不先运行此功能, 绝不安装不信任的技能 .