Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions .github/PULL_REQUEST_TEMPLATE/standard.md

This file was deleted.

26 changes: 19 additions & 7 deletions .github/workflows/ci-prd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
SPRING_PROFILES_ACTIVE: test
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
submodules: recursive
token: ${{ secrets.PAT }}
Expand All @@ -34,20 +34,32 @@ jobs:
run: ./gradlew clean build --info --stacktrace --no-daemon

- name: Docker login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set image tag
id: vars
run: echo "IMAGE_TAG=${GITHUB_SHA::7}" >> $GITHUB_ENV

- name: Build Docker image
run: docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/startuplight-be:${{ env.IMAGE_TAG }} -f deploy/Dockerfile .

- name: Docker Hub push
run: docker push ${{ secrets.DOCKERHUB_USERNAME }}/startuplight-be:${{ env.IMAGE_TAG }}
# Multi-architecture 빌드 및 푸시
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile
platforms: linux/amd64,linux/arm64 # 두 아키텍처 모두 빌드
push: true
tags: ${{ secrets.DOCKERHUB_USERNAME }}/startuplight-be:${{ env.IMAGE_TAG }}
cache-from: type=gha
cache-to: type=gha,mode=max
Comment on lines +52 to +62
Copy link

@coderabbitai coderabbitai bot Dec 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

echo "=== 디렉토리 구조 확인 ==="
ls -la deploy/ 2>/dev/null || echo "deploy 디렉토리 없음"

echo -e "\n=== Dockerfile 내용 ==="
cat deploy/Dockerfile 2>/dev/null || echo "Dockerfile 없음"

echo -e "\n=== Gradle 파일 목록 ==="
fd -type f -name "build.gradle*" 2>/dev/null

echo -e "\n=== build.gradle 파일 확인 ==="
cat build.gradle 2>/dev/null || cat build.gradle.kts 2>/dev/null || echo "build.gradle 파일 없음"

echo -e "\n=== 네이티브 라이브러리 의존성 검색 ==="
if [ -f "build.gradle" ] || [ -f "build.gradle.kts" ]; then
  rg -i "native|jni|jna|netty-transport-native|ojdbc|oracle|postgresql|mysql|h2" build.gradle* -C 2 || echo "해당 의존성 없음"
fi

Repository: StartUpLight/STARLIGHT_BE

Length of output: 1380


🏁 Script executed:

#!/bin/bash

echo "=== Gradle 모듈 파일 확인 ==="
ls -la gradle/

echo -e "\n=== database.gradle (DB 드라이버) ==="
cat gradle/database.gradle

echo -e "\n=== spring.gradle (Spring 의존성) ==="
cat gradle/spring.gradle

echo -e "\n=== 기타 gradle 파일들 ==="
for file in gradle/config.gradle gradle/jwt.gradle gradle/util.gradle gradle/ai.gradle; do
  if [ -f "$file" ]; then
    echo "=== $file ==="
    cat "$file"
  fi
done

echo -e "\n=== JRE Alpine base image 아키텍처 지원 확인 ==="
echo "eclipse-temurin:21-jre-alpine는 DockerHub에서 linux/amd64, linux/arm64 모두 지원합니다 (공식 문서 확인 필요)"

Repository: StartUpLight/STARLIGHT_BE

Length of output: 3833


🌐 Web query:

eclipse-temurin 21 jre alpine multi-architecture support amd64 arm64

💡 Result:

Short answer: The official eclipse-temurin repository publishes multi‑arch images (including amd64 and arm64), but the alpine variant tags (e.g. 21-jre-alpine / -jdk-alpine) have historically been published only for amd64 — so an out‑of‑the‑box linux/arm64 manifest for 21-jre-alpine is often not available. [1][2][3]

What to do

  • Use the non‑Alpine Temurin 21 runtime tag (e.g. eclipse-temurin:21-jre) — that tag is published as a multi‑arch manifest including linux/arm64 and linux/amd64. [1][3]
  • If you need Alpine/musl: build a multi‑arch alpine image yourself (multi‑arch build or buildx) or use a vendor that provides arm64 Alpine JRE builds (or use a slim Debian/Ubuntu variant as an alternative). Community issues and Q&A note users must build the alpine variant for ARM when the upstream tag lacks an arm64 manifest. [2][4]

Sources

  1. Eclipse Temurin Docker Hub (supported architectures & variant notes). [Docker Hub]. [1]
  2. adoptium/containers GitHub issue and community reports about -alpine not having ARM manifests. [2]
  3. StackOverflow examples reporting "no matching manifest for linux/arm64/v8" for -alpine and recommending non‑alpine multi‑arch tags. [3]

Would you like me to check the current manifest for a specific tag (e.g. inspect eclipse-temurin:21-jre-alpine manifest now) and return exact platforms?


❌ Dockerfile의 베이스 이미지가 ARM64 멀티아키텍처 빌드를 지원하지 않습니다 - 즉시 수정 필요

CI/CD 파이프라인이 현재 설정 그대로 실행되면 linux/arm64 빌드에서 실패합니다.

문제점:
eclipse-temurin:21-jre-alpineamd64 아키텍처만 지원합니다. docker/build-push-action이 arm64 이미지를 빌드하려 할 때 "no matching manifest for linux/arm64/v8" 에러가 발생합니다.

해결 방법:
deploy/Dockerfile의 런타임 베이스 이미지를 다음과 같이 변경하세요:

Dockerfile 수정 사항
  # 빌드 단계
  FROM eclipse-temurin:21-jdk AS builder
  WORKDIR /app
  COPY . .
  RUN ./gradlew build -x test

  # 실행 단계
- FROM eclipse-temurin:21-jre-alpine AS runtime
+ FROM eclipse-temurin:21-jre AS runtime
  WORKDIR /app
  COPY --from=builder /app/build/libs/*.jar app.jar
  EXPOSE 8080
  ENTRYPOINT ["java", "-jar", "app.jar"]

eclipse-temurin:21-jre (non-Alpine)는 amd64와 arm64 모두에서 공식 지원되며, 이미지 크기 차이도 무시할 수 있는 수준입니다. 멀티아키텍처 빌드가 성공적으로 실행될 수 있도록 이 변경을 먼저 적용하세요.

Committable suggestion skipped: line range outside the PR's diff.

🤖 Prompt for AI Agents
In .github/workflows/ci-prd.yaml around lines 52-62 the workflow triggers a
multi-arch build (linux/amd64, linux/arm64) but your deploy/Dockerfile uses an
Alpine Temurin base that only supports amd64; open deploy/Dockerfile and replace
the Alpine runtime base (e.g., FROM eclipse-temurin:21-jre-alpine) with a
multi-arch-supported image such as FROM eclipse-temurin:21-jre, then adjust any
Alpine-specific commands (apk add, musl-specific tweaks) to Debian/Ubuntu
equivalents (apt-get install, dpkg paths) or remove them so the Dockerfile is
compatible with the non-Alpine base, and re-run the CI multi-arch build to
verify arm64 succeeds.

Copy link
Member Author

@SeongHo5356 SeongHo5356 Dec 31, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

스테이징 서버로 검증했는데 멀티 아키텍쳐로 잘 빌드 되고 있고, 현재 액션도 성공한 걸로 보인다.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash

echo "=== Current deploy/Dockerfile content ==="
cat deploy/Dockerfile

echo -e "\n=== Checking staging workflow for differences ==="
cat .github/workflows/ci-stg.yaml | grep -A 10 "docker/build-push-action"

echo -e "\n=== Checking for recent Dockerfile changes in git history ==="
git log --oneline --all -10 -- deploy/Dockerfile

Length of output: 892


🌐 Web query:

eclipse-temurin 21-jre-alpine ARM64 support 2025

💡 Result:

Short answer: Yes — as of Dec 31, 2025 the official eclipse-temurin:21-jre-alpine images are published for ARM64 (linux/arm64 / arm64v8). See the Docker Hub supported architectures and the Adoptium release notes about Alpine images. [1][2]

Sources

  • Docker Hub eclipse-temurin (supported architectures: amd64, arm32v7, arm64v8, …). [1]
  • Adoptium release notes (Alpine images / Alpine 3.22 default for Temurin container images). [2]

@SeongHo5356, 스테이징 검증 결과를 확인해주셔서 감사합니다! 👍

확인 결과, 제가 제시한 우려는 더 이상 유효하지 않습니다. eclipse-temurin:21-jre-alpine 이미지가 이제 ARM64 아키텍처를 공식 지원하고 있어서, 현재 Dockerfile 설정 그대로 멀티 아키텍처 빌드가 정상적으로 작동합니다.

스테이징 서버에서의 실제 검증이 이를 확인해주었네요. 현재 설정으로 프로덕션 배포도 문제없이 진행하실 수 있습니다. 실제 테스트를 통해 확인해주셔서 감사합니다! 🚀


- name: Checkout manifest repository
uses: actions/checkout@v4
Expand Down
16 changes: 8 additions & 8 deletions .github/workflows/ci-stg.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
SPRING_PROFILES_ACTIVE: test
steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
submodules: recursive
token: ${{ secrets.PAT }}
Expand All @@ -33,25 +33,25 @@ jobs:
- name: Build with Gradle Wrapper
run: ./gradlew clean build --info --stacktrace --no-daemon

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Docker login
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_PASSWORD }}

- name: Set up QEMU
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Set image tag
id: vars
run: echo "IMAGE_TAG=${GITHUB_SHA::7}" >> $GITHUB_ENV

# Multi-architecture 빌드 및 푸시
- name: Build and push Docker image
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
context: .
file: deploy/Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion config
Loading