quarkus-native-and-container
하는 일
이 도구는 '네이티브 실행 파일'이라고 부르는, Quarkus 코드의 더 빠르고 효율적인 버전을 만드는 데 도움을 줍니다. 이 과정에서 생기는 흔한 오류를 고치고, Docker 같은 컨테이너나 Kubernetes 같은 플랫폼에서 실행할 패키지를 만드는 것도 돕습니다.
사용하는 경우
- ✓Quarkus 애플리케이션이 훨씬 빨리 시작되기를 원할 때.
- ✓클라우드 환경(Kubernetes 등)에서 실행할 준비를 할 때.
- ✓애플리케이션의 네이티브 버전을 빌드하는 중에 오류가 생겼을 때.
스킬 링크
https://github.com/github/awesome-copilot/blob/main/skills/quarkus-native-and-container/SKILL.md복사해서 AI(Claude, ChatGPT, Cursor)에 붙여넣고 지침을 따르도록 요청하세요.
사용 방법
가장 쉬운 방법입니다. 메시지를 복사해 AI에 붙여넣으세요. AI가 스킬을 읽고 지침을 따릅니다.
바로 붙여넣을 수 있는 메시지
Claude Code, Codex, Cursor용입니다. 프로젝트 폴더에서 실행하면 스킬이 설치됩니다.
SKILL.md를 다운로드해 에이전트의 스킬 폴더에 넣으세요.
AI에게 요청하는 예시
“Quarkus 애플리케이션의 네이티브 실행 파일을 만들고 Docker 컨테이너로 패키징하려면 어떻게 하나요?”
매주 새 스킬 5개. 읽는 데 1분.
작동 방식
도구는 Maven이나 Gradle의 특정 명령을 사용해 Quarkus 코드를 네이티브 실행 파일로 컴파일합니다. 오류가 생기면 네이티브 컴파일 중 특별한 접근 권한이 필요한 코드 부분을 등록하거나, 필요한 파일을 포함하는 방법을 제공합니다.
기술 내용 (원본 SKILL.md)
작성자의 영어 원문을 GitHub에서 그대로 가져왔습니다.
Quarkus Native and Container
Check the project's Quarkus version first. For generic (non-Quarkus) GraalVM work, use the optional java-add-graalvm-native-image-support skill if installed (otherwise see the GraalVM docs, https://www.graalvm.org/latest/reference-manual/native-image/).
Native build
# container build: no local GraalVM needed (Docker/Podman required)
./mvnw package -Dnative -Dquarkus.native.container-build=true
# local Mandrel/GraalVM (JAVA_HOME / GRAALVM_HOME must point to it)
./mvnw package -Dnative
# Gradle, Quarkus 3.10+ (add -Dquarkus.native.container-build=true without a local Mandrel)
./gradlew build -Dquarkus.native.enabled=true -Dquarkus.package.jar.enabled=false
# Gradle, older Quarkus
./gradlew build -Dquarkus.package.type=native
quarkus.package.type was deprecated in 3.10 (the 3.10 migration guide replaces it with quarkus.native.enabled and quarkus.package.jar.*); it is still accepted in 3.40 with a warning. Version gate verified with Gradle: on 3.9.5 -Dquarkus.native.enabled=true -Dquarkus.package.jar.enabled=false is ignored ("Unrecognized configuration key" warnings) and only a JVM quarkus-app is built, while -Dquarkus.package.type=native produces the native runner; on 3.10.0, 3.27.6 and 3.40.1 the new keys produce the native runner (3.10.0 also accepts the old key with the deprecation warning). The Maven native profile in the generated pom.xml already sets quarkus.native.enabled=true, quarkus.package.jar.enabled=false and skipITs=false when -Dnative is passed.
Local build verified on macOS arm64 with the Mandrel tarball for your Quarkus line from https://github.com/graalvm/mandrel/releases (mandrel-java25-macos-aarch64-25.0.4.1-Final.tar.gz for 3.40.1, extracted anywhere, JAVA_HOME pointing at its Contents/Home; Xcode command line tools are enough): 3.40.1 Maven package -Dnative took about 70 s and Gradle build with the two flags about 2.5 min; the runner is a Mach-O executable that starts in about 0.04 s, and ./mvnw verify -Dnative ran the *IT against it successfully. Quarkus checks the Mandrel/GraalVM version: 3.40 refuses 23.1 ("Out of date version of GraalVM or Mandrel detected ... Quarkus currently supports 25.0.0"), so use Mandrel 25 with 3.40 and mandrel-java21-macos-aarch64-23.1.12.1-Final with 3.27.6 (Maven verify -Dnative and Gradle both verified there).
Binary: target/*-runner (Maven) or build/*-runner (Gradle). A container build on macOS or Windows produces a Linux ELF that cannot run on the host: run it in a Linux container (for example docker run -v "$PWD/target:/w:ro" registry.access.redhat.com/ubi9/ubi-minimal /w/<name>-runner with the datasource passed through QUARKUS_DATASOURCE_* env vars), and note that ./mvnw verify -Dnative then fails in the *IT with Exit code is: '126'. Mandrel is Red Hat's GraalVM distribution for Quarkus; the container build pulls a Mandrel builder image matching the project (3.40.1 used quay.io/quarkus/ubi9-quarkus-mandrel-builder-image:jdk-25, Mandrel 25.0.4.1, about 2.5 minutes including the image pull); override it with quarkus.native.builder-image if needed. Native builds are slow and memory-hungry (several GB); do them in CI or on demand, not on every test run.
Common native failures
| Symptom | Fix |
|---|---|
ClassNotFoundException / NoSuchMethodException at runtime (reflection, JSON serialization of DTOs) |
annotate with @RegisterForReflection (or @RegisterForReflection(targets = ...) on a holder class for third-party types), or put a reflection-config.json in src/main/resources and set quarkus.native.additional-build-args=-H:ReflectionConfigurationFiles=reflection-config.json |
| Missing resource files | quarkus.native.resources.includes=templates/** |
| Library not supporting native | look for a Quarkus extension, or choose another library |
| Class initialized at build time breaks | --initialize-at-run-time=... through quarkus.native.additional-build-args |
OutOfMemoryError during build |
raise container memory or quarkus.native.native-image-xmx |
| Dynamic proxies / serialization | register via annotations or extension |
@RegisterForReflection(targets = ExternalDto.class)
public record ProductDto(String name) {}
…
자주 묻는 질문
'네이티브 실행 파일'은 무엇인가요?
Java 전체 환경 없이도 기기에서 직접 실행되도록 컴파일된 프로그램 버전입니다. 그래서 시작이 빠르고 보통 자원을 적게 씁니다.
네이티브 실행 파일을 만드는 것이 왜 느린가요?
네이티브 컴파일은 복잡한 과정입니다. 모든 코드를 분석해 최적화하고 JVM(Java Virtual Machine) 없이 실행되도록 준비하므로 많은 메모리와 처리 능력이 필요합니다.
네이티브 실행 파일을 만들 때 'ClassNotFoundException' 오류가 나면 어떻게 하나요?
보통 네이티브 컴파일러가 특정 클래스를 포함하거나 특별한 방식으로 접근해야 한다는 것을 모른다는 뜻입니다. 코드에 특정 어노테이션을 추가하거나, 컴파일러에 알려 주는 설정 파일을 만들어 해결할 수 있습니다.
상세 정보
작성자의 원본 설명
Build Quarkus native executables (Mandrel/GraalVM), fix native failures with reflection registration, test the native binary, and produce container images and Kubernetes/OpenShift manifests. Use for native, Docker, Jib or Kubernetes work in a Quarkus project.
repo: github/awesome-copilot
인기도
- GitHub 스타
- 40k
- 순위
- #7379
- 라이선스
- MIT
- 업데이트
- 2026. 10. 15.
댓글
- …
이 저장소의 다른 스킬
acquire-codebase-knowledge
40k에이전트가 기존 코드 프로젝트를 이해하고 문서화하도록 돕습니다. 새 구성원을 맞이하거나 아키텍처를 개괄적으로 파악할 때 유용합니다.
acreadiness-assess
40k에이전트가 프로젝트의 AI 준비 상태를 평가하고 보고서를 만들도록 합니다. 프로젝트가 AI 도구를 쓸 준비가 얼마나 되어 있는지 이해하는 데 유용합니다.
acreadiness-generate-instructions
40k에이전트가 평가 결과를 바탕으로 AI 도구를 위한 지침을 만들도록 돕습니다. AI가 코드와 상호작용하는 방식을 개선하고 확인된 공백을 메울 때 유용합니다.
acreadiness-policy
40k에이전트가 AI 프로젝트 평가를 위한 정책을 정의하거나 적용하도록 돕습니다. 프로젝트 평가 방식을 표준화하고 규정 준수를 보장할 때 유용합니다.
비슷한 스킬
openclaw-update
394k에이전트가 설치 방식에 맞는 방법을 골라 기존 OpenClaw Gateway를 업데이트하고, 세션이 계속 작동하도록 돕습니다.
diagnose-gateway
394k에이전트가 설정, 채널, 포트를 확인해 OpenClaw Gateway가 왜 실패하는지 찾되, 아무것도 바꾸지 않도록 돕습니다.
crabbox-apps
394k에이전트가 임시 클라우드 머신에서 앱을 열고 실행한 뒤, 그 화면을 채팅의 측면 패널에 보여 주도록 돕습니다.