harbor- redis

진웅·2025년 8월 19일

harbor

목록 보기
3/5

같은 서버에 Podman으로 Redis를 올리고 Harbor와 연결하는 기본 설치 및 연결 가이드는 아래와 같습니다.


1. Podman으로 Redis 컨테이너 실행

# Redis image 다운로드
podman pull redis:latest

# Redis 컨테이너 실행 (포트 6379 노출)
podman run -d --name redis_server -p 6379:6379 redis:latest
  • 기본 포트 6379로 Redis 서버 실행
  • 필요 시 --restart=always 옵션으로 자동 재시작 설정 가능

2. Redis를 시스템 서비스로 등록 (옵션)

# Podman 컨테이너 systemd 서비스 파일 생성
podman generate systemd redis_server > /etc/systemd/system/redis_server.service

# systemd 서비스 재로드 및 활성화
systemctl daemon-reload
systemctl enable --now redis_server.service

# 상태 확인
systemctl status redis_server.service

3. Harbor 설정과 Redis 연결

harbor.yml 내 Redis 관련 설정 예시:

external_redis:
  host: 127.0.0.1:6379
  password:
  registry_db_index: 1
  jobservice_db_index: 2
  trivy_db_index: 3
  • host는 Redis 컨테이너가 포트를 노출한 IP와 포트(여기서는 localhost:6379).
  • Redis가 비밀번호 없이 실행 중이면 password: 는 빈값.
  • 각 데이터베이스 인덱스는 Harbor 내부에서 쓰임새별로 분리해 쓸 수 있음.

4. 테스트 및 확인

  • Redis CLI 접속 테스트
podman exec -it redis_server redis-cli ping
  • PONG 응답이 나오면 정상 실행 중.

  • Harbor 설치/재시작 후 로그에서 Redis 연결 오류가 없는지 확인


요약

단계명령 및 설정
Redis container 실행podman run -d --name redis_server -p 6379:6379 redis:latest
systemd 서비스 등록podman generate systemd redis_server + systemctl enable/start
harbor.yml 설정external_redis에 Redis 주소 및 DB index 설정
연결 테스트podman exec -it redis_server redis-cli ping

Podman으로 Redis를 쉽게 띄우고 Harbor의 external_redis에 맞게 연결하면, Harbor에서 Redis 기반 캐시 및 작업 큐를 정상적으로 활용할 수 있습니다.[1][3]

[1] https://tech.chhanz.xyz/container/2020/03/02/podman/
[2] https://han-py.tistory.com/390
[3] https://computingforgeeks.com/how-to-run-redis-in-podman-docker-container/
[4] https://mkdir-chandler.tistory.com/333
[5] https://docs.oracle.com/ko/learn/podman-quay/
[6] https://mkdir-chandler.tistory.com/338
[7] https://docs.redhat.com/ko/documentation/red_hat_3scale_api_management/2.8/html/installing_3scale/podman-command-options

profile
bytebliss

0개의 댓글