Remark : raspberrypi 에 Docker를 설치해 보자
1.기존 Old Docker 삭제
1 2 3 |
$ sudo apt-get remove docker docker-engine docker.io containerd runc |
2.저장소 세팅
1 2 3 4 5 6 7 8 |
$ sudo apt-get update $ sudo apt-get install \ ca-certificates \ curl \ gnupg \ lsb-release |
3.Docker 키 생성
1 2 3 4 |
$ sudo mkdir -p /etc/apt/keyrings $ curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
3.저장소 사용
1 2 3 4 5 |
$ echo \ "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
4.Install
1 2 3 4 |
$ sudo apt-get update $ sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin |
5.hello-word image 테스트
1 2 3 |
$ sudo docker run hello-world |
6.hello-word image 확인
1 2 3 4 5 |
$ sudo docker images hello-world REPOSITORY TAG IMAGE ID CREATED SIZE hello-world latest 1ec996c686eb 13 months ago 4.85kB |
6.Docker 엔진 모두 삭게
1 2 3 4 5 6 |
$ sudo apt-get purge docker-ce docker-ce-cli containerd.io docker-compose-plugin$ s $ sudo rm -rf /var/lib/docker $ sudo rm -rf /var/lib/containerd |