0
1

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.

RaspberryPiのDockerでRemoteAPIを有効化する

0
Last updated at Posted at 2017-04-22

Dockerのインストール

ここの内容でインストールを行う
curl -sSL https://get.docker.com | sh

バージョン確認

 docker version
Client:
 Version:      17.04.0-ce
 API version:  1.28
 Go version:   go1.7.5
 Git commit:   4845c56
 Built:        Mon Apr  3 18:22:23 2017
 OS/Arch:      linux/arm

Server:
 Version:      17.04.0-ce
 API version:  1.28 (minimum version 1.12)
 Go version:   go1.7.5
 Git commit:   4845c56
 Built:        Mon Apr  3 18:22:23 2017
 OS/Arch:      linux/arm
 Experimental: false

RemoteAPI有効化

以下のとおり変更

/lib/systemd/system/docker.service
# ExecStart=/usr/bin/dockerd -H fd://
ExecStart=/usr/bin/dockerd -H tcp://0.0.0.0:4243 -H unix:///var/run/docker.sock

Serviceのリロード・再起動

daemon-reloadをしっかり行わないと反映されない

systemctl daemon-reload
service docker restart

API確認

curl http://localhost:4243/version
{"Version":"17.04.0-ce","ApiVersion":"1.28","MinAPIVersion":"1.12","GitCommit":"4845c56","GoVersion":"go1.7.5","Os":"linux","Arch":"arm","KernelVersion":"4.4.34-v7+","BuildTime":"2017-04-03T18:22:23.595577260+00:00"}
0
1
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
0
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?