ubunt 16.04에서 docker 재설치 가이드이다. 



기존 환경은 docker 1.11인데, 최신인 docker ce(18.03.1-ce)을 설치한다. 

https://docs.docker.com/install/linux/docker-ce/ubuntu/#set-up-the-repository


root 사용자로 진행한다.



$ apt-get remove docker docker-engine docker.io


$ rm /etc/systemd/system/docker.service.d/docker.conf


$ setproxy apt-get update


$ apt-get install \

    apt-transport-https \

    ca-certificates \

    curl \

    software-properties-common



PROXY를 셋팅한다.

$ export ..



$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -

OK



$ apt-key fingerprint 0EBFCD88

pub   4096R/0EBFCD88 2017-02-22

      Key fingerprint = 9DC8 5822 9FC7 DD38 854A  E2D8 8D81 803C 0EBF CD88

uid                  Docker Release (CE deb) <docker@docker.com>

sub   4096R/F273FCD8 2017-02-22




$ sudo add-apt-repository \

   "deb [arch=amd64] https://download.docker.com/linux/ubuntu \

   $(lsb_release -cs) \

   stable"


$ apt-get update

   

$ apt-get install docker-ce


$ docker version

Client:

 Version:      18.03.1-ce

 API version:  1.37

 Go version:   go1.9.5

 Git commit:   9ee9f40

 Built:        Thu Apr 26 07:17:20 2018

 OS/Arch:      linux/amd64

 Experimental: false

 Orchestrator: swarm


Server:

 Engine:

  Version:      18.03.1-ce

  API version:  1.37 (minimum version 1.12)

  Go version:   go1.9.5

  Git commit:   9ee9f40

  Built:        Thu Apr 26 07:15:30 2018

  OS/Arch:      linux/amd64

  Experimental: false



$ service docker start 








만약 proxy 이슈라면 다음을 실행한다. 




$ setproxy apt-get update


$ setproxy apt-get install docker-ce


$ service docker start 



$ docker version

Client:

 Version:      18.03.1-ce

 API version:  1.37

 Go version:   go1.9.5

 Git commit:   9ee9f40

 Built:        Thu Apr 26 07:17:20 2018

 OS/Arch:      linux/amd64

 Experimental: false

 Orchestrator: swarm


Server:

 Engine:

  Version:      18.03.1-ce

  API version:  1.37 (minimum version 1.12)

  Go version:   go1.9.5

  Git commit:   9ee9f40

  Built:        Thu Apr 26 07:15:30 2018

  OS/Arch:      linux/amd64

  Experimental: false

  

  

참고

https://docs.docker.com/install/linux/docker-ce/ubuntu/#install-docker-ce-1




Posted by '김용환'
,