LoginSignup
6
6

More than 5 years have passed since last update.

Linux mint 18にDockerをインストール

Posted at

基本的に
https://docs.docker.com/engine/installation/linux/ubuntu/
の通り。

いくつかつまづきポイントがあったのでメモ。

以下、上記ページの通り進んでいき、つまづいた部分に注意書きを入れていきます↓

Prerequirements

Recommended extra packages

$ sudo apt-get update

$ sudo apt-get install curl \
    linux-image-extra-$(uname -r) \
    linux-image-extra-virtual

私の場合、sudo apt-get install linux-image-extra-virtual

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 linux-image-extra-virtual : Depends: linux-image-generic (= 4.4.0.59.62) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

というエラーが出たので、

$ sudo apt-get install linux-image-generic

してから再度

$ sudo apt-get install linux-image-extra-virtual

を実行。

Install docker

Install using the repository

Set up the repository

基本的に上記ページの通り。

$ sudo apt-get install apt-transport-https \
                       ca-certificates
$ curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
$ apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D

↓ここでlsb_releaseを使わず、直接ubuntu-xenialと入力する (xenial = Ubuntu 16.04)。
Linux mint 18はUbuntu 16.04ベースだが、lsb_releaseは"sarah"を返す。
dockerのリポジトリはUbuntu16.04用のものを使いたいので"sarah"ではなく、"xenial"を入力する。

sudo add-apt-repository "deb https://apt.dockerproject.org/repo/ ubuntu-xenial main"

もし間違ったリポジトリを登録してしまったら、メニューで"Software Sources"を選択して開き、"Additional repositories"から削除する。

Install Docker

上記ページの通り普通にインストールする。

$ sudo apt-get update
$ sudo apt-get -y install docker-engine
6
6
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
6
6