docker+jenkins+nginx 로 시작하기 2 (CD)

Seunghyeon·2024년 4월 23일
0

1. SSL 발급받기

letsencrypt 를 통해 https 인증서를 받는다.

sudo apt-get install letsencrypt
sudo letsencrypt certonly --standalone -d <도메인>

이 인증서는 90일 유효하므로 기한이 끝나기 전 갱신을 해주거나
certbot을 통해 자동으로 갱신되게 하는 시스템이 있어서 그걸 사용해야 한다고 함
(여기서는 일단 90일 인증서로 진행)

2. Jenkins 내 Docker 설치

jenkins 컨테이터 접속 후 설치해준다.

docker exec -it jenkins bash
            apt-get update && \
            apt-get -y install apt-transport-https \
                ca-certificates \
                curl \
                gnupg2 \
                software-properties-common && \
            curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add - && \
            add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" && \
            apt-get update && \
            apt-get -y install docker-ce-cli
profile
그냥 합니다.

0개의 댓글