40
47

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

UbuntuにDocker CEをインストールする

Last updated at Posted at 2017-05-03

目的

  • Docker CE/EE が発表されて、Dockerのインストール方法が変わったのでメモ
  • CE…無償のコミュニティエディション、EE…商用版
  • CE版をインストールする

環境

  • Ubuntu 16.04

参考

インストール

1. リポジトリ設定

$ sudo apt-get -y install apt-transport-https ca-certificates curl software-properties-common
$ 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 $(lsb_release -cs) stable"
$ sudo apt-get update

2. Docker CE インストール

sudo apt-get -y install docker-ce

3. ユーザーをdockerグループに追加

1.このままだとdocker実行に毎回sudoが必要となるので、dockerグループにユーザを追加する

$ sudo adduser ユーザ名 docker

2.再ログイン
3.groups コマンドで追加を確認

$ groups
lynlea adm cdrom sudo dip plugdev lpadmin sambashare docker

4. 試す

$ docker run hello-world

・・・
Hello from Docker!
This message shows that your installation appears to be working correctly.
・・・
40
47
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
40
47

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?