Docker 설치

OS/Raspberry Pi 2020. 3. 7. 22:51 Posted by 파란크리스마스

출처

Docker 설치

$ curl -fsSL get.docker.com -o get-docker.sh
$ chmod +x get-docker.sh 
$ sudo ./get-docker.sh
## Executing docker install script, commit: 442e66405c304fa92af8aadaa1d9b31bf4b0ad94
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "https://download.docker.com/linux/raspbian/gpg" | apt-key add -qq - >/dev/null
Warning: apt-key output should not be parsed (stdout is not a terminal)
+ sh -c echo "deb [arch=armhf] https://download.docker.com/linux/raspbian buster stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ [ -n  ]
+ sh -c apt-get install -y -qq --no-install-recommends docker-ce >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           19.03.7
 API version:       1.40
 Go version:        go1.12.17
 Git commit:        7141c19
 Built:             Wed Mar  4 01:55:10 2020
 OS/Arch:           linux/arm
 Experimental:      false
 
Server: Docker Engine - Community
 Engine:
  Version:          19.03.7
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.12.17
  Git commit:       7141c19
  Built:            Wed Mar  4 01:49:01 2020
  OS/Arch:          linux/arm
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683
If you would like to use Docker as a non-root user, you should now consider
adding your user to the "docker" group with something like:
 
  sudo usermod -aG docker your-user
 
Remember that you will have to log out and back in for this to take effect!
 
WARNING: Adding a user to the "docker" group will grant the ability to run
         containers which can be used to obtain root privileges on the
         docker host.
         Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
         for more information.

일반 계정으로 docker 사용 가능하게 설정하기

$ sudo usermod -aG docker pi

Docker 서비스 상태 확인

$ sudo systemctl status docker.service
[0m docker.service - Docker Application Container Engine
   Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled)
   Active: active (running) since Sat 2020-03-07 14:27:52 GMT; 4min 6s ago
     Docs: https://docs.docker.com
 Main PID: 1968 (dockerd)
    Tasks: 13
   Memory: 32.6M
   CGroup: /system.slice/docker.service
           붴1968 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock

Mar 07 14:27:49 raspberrypi dockerd[1968]: time="2020-03-07T14:27:49.910122440Z" level=warning msg="Your
Mar 07 14:27:49 raspberrypi dockerd[1968]: time="2020-03-07T14:27:49.910211138Z" level=warning msg="Your
Mar 07 14:27:49 raspberrypi dockerd[1968]: time="2020-03-07T14:27:49.910297388Z" level=warning msg="Your
Mar 07 14:27:49 raspberrypi dockerd[1968]: time="2020-03-07T14:27:49.911678268Z" level=info msg="Loading
Mar 07 14:27:51 raspberrypi dockerd[1968]: time="2020-03-07T14:27:51.512894394Z" level=info msg="Default
Mar 07 14:27:52 raspberrypi dockerd[1968]: time="2020-03-07T14:27:52.162989392Z" level=info msg="Loading
Mar 07 14:27:52 raspberrypi dockerd[1968]: time="2020-03-07T14:27:52.492641302Z" level=info msg="Docker 
Mar 07 14:27:52 raspberrypi dockerd[1968]: time="2020-03-07T14:27:52.493554631Z" level=info msg="Daemon 
Mar 07 14:27:52 raspberrypi systemd[1]: Started Docker Application Container Engine.
Mar 07 14:27:52 raspberrypi dockerd[1968]: time="2020-03-07T14:27:52.904478155Z" level=info msg="API lis

댓글을 달아 주세요

  1. dsk10102002 2020.11.20 00:14  댓글주소  수정/삭제  댓글쓰기

    유용한 내용 매우 잘 배우고 가여