-
[Ubuntu] local-repo + docker-ce repo 생성하기Linux 2025. 3. 21. 12:47
폐쇄망 환경에서 Kubernetes를 설치할 때 필요한 로컬 레포지토리 및 Docker CE 레포지토리를 온라인 환경에서 준비했던 방법입니다.
☞ [K8S][폐쇄망]Kubespray로 Kubernetes 설치하기 - Ubuntu
Local Repo
- 도구 설치
sudo apt-get install apt-mirror
- 공식 버전 업데이트 종료로 sync 오류가 발생하기 때문에 apt--mirror fork 버전을 사용
git clone https://github.com/Stifler6996/apt-mirror sudo mv /usr/bin/apt-mirror /usr/bin/apt-mirror.backup sudo cp apt-mirror/apt-mirror /usr/bin/apt-mirror sudo chmod 755 /usr/bin/apt-mirror ; sudo chown root:root /usr/bin/apt-mirror
- mirror.list 설정
[ubuntu release명]
18.04 LTS - bionic
20.04 LTS - focal
22.04 LTS - jammy# deb-amd64 <http://archive.ubuntu.com/ubuntu> [ubuntu release명] main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu bionic main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu bionic-security main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu bionic-updates main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu bionic-proposed main restricted universe multiverse deb http://archive.ubuntu.com/ubuntu bionic-backports main restricted universe multiverse
- mirror 실행
sudo apt-mirror
- 확인 및 압축
cd /var/spool/apt-mirror/mirror/archive.ubuntu.com # 압축 tar cvf ubuntu18-repo.tar.gz ubuntu
Docker CE Repo
- 해당 os 버전에 맞는 레포 확인
- docker 패키지 다운로드
wget -r -nH --cut-dirs=2 --no-parent -R "index.html*" -P docker-[release명] https://download.docker.com/linux/ubuntu/dists/[release명]/pool/stable/amd64/
Reference
'Linux' 카테고리의 다른 글
[Nginx] Proxy Server 테스트 (0) 2025.03.21 [ERROR][Ubuntu] Hash Sum mismatch (0) 2025.03.21 [CentOS7/Rocky8] local-repo + docker-ce repo 생성하기 (0) 2025.03.21 부팅 시 Nvidia 전력 제한 설정 (0) 2024.03.06 [GPU] NVIDIA Driver 설치하기 (Ubuntu) (0) 2024.03.04