chmod 400 /Users/lee/Desktop/jenkins.pem
ssh -i ~/Desktop/jenkins.pem ubuntu@[IP Address]
sudo apt-get install apt-transport-https ca-certificates
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu bionic stable"
sudo apt update
sudo apt-get install docker-ce
sudo docker info
docker run -d --name jenkins_dev -p 8080:8080 jenkins/jenkins:lts
docker exec -it jenkins_dev bash
cat /var/jenkins_home/secrets/initialAdminPassword
docker run -d --name jenkins_prod -p 8080:8080 -p 50000:50000 -v jenkins-home-prod:/var/jenkins_home jenkins/jenkins:lts
docker exec -it jenkins_prod ls -lrt /var/jenkins_home
3. 도커 볼륨 목록 확인
docker volume ls
4. 이제 영구적인 jenkins_home 폴더를 가진 젠킨스 도커 컨테이너가 생성됬음.
docker exec -it jenkins_prod bash
cat /var/jenkins_home/secrets/initialAdminPassword
6. 초기 접속시 화면
docker kill jenkins_prod
docker rm jenkins_prod
docker ps -a
docker run -d --name jenkins_prod -p 8080:8080 -p 50000:50000 -v jenkins-home-prod:/var/jenkins_home jenkins/jenkins:lts