2017年12月30日土曜日

#GoogleHome と #IFTTT と #LINE

GoogleHome, IFTTT, LINE

IFTTTでGoogleHomeとLINEを連携してみた。

買い忘れ防止w
日本語がアレですが、、、


自分:「ねぇ、Google. 買い物で トリヒキニク を買う」
GoogleHome:「さかえるのじゃぁー」
LINE Notify:「[IFTTT]鳥 ひき肉 をかうのだ」


簡単すぎるっ!

マン・マシンインターフェースは、ディスプレイ・キーボード・マウスから次のステージへいくのかもしれないですね。

The Conversational UI and Why It Matters

https://developers.google.com/actions/design/?authuser=1





2017年12月20日水曜日

#Selenium-webdriver Unknown policy: DnsPrefetchingEnabled

Unknown policy: DnsPrefetchingEnabled


selenium webdriver でこんなエラーがでるときは chrome のpolicy のようです。

chromeの設定はこちらから確認できます。
chrome://policy/

でどうすれば???

2017年12月17日日曜日

#GoogleHome がうちにやってきた

GoogleHome came home.


Spotify, radiko ヘビーユーザーなのでこれはイイです。
今までは、スマホをAUX接続してステレオから聴いていたのですが、おもったよりも音がよいので単体でもオーケーです。

ビックカメラの半額キャンペーンで入手!もう1個買えばよかった。


2017年12月16日土曜日

ポジション球交換

ポジション球を交換しました。

カプラー外すと固くて。。。
カプラーをつけたままのほうが回しやすいですね。
左にまわすと外れます。
写真はカプラー外したものです。

定番のスタンレー:適合は↓こちらから
http://stanley-raybrig.com/index.php

2017年12月13日水曜日

CakePHPでコントローラーから呼び出したコントローラーのコンポーネント呼び出し

How to call the controller's component called from the controller with CakePHP


ControllerAから呼び出したControllerBに $components で宣言されているコンポーネントFooのメソッドbarを呼び出すときは手動でloadする必要があります。
ざっくりと。。。

ControllerAはこんな感じ
$B = new BController;
$B->hoge();
ControllerBはこんな感じ
$componets = ['Foo']; // コンポーネントを使うよ
function hoge() {
  // newされたときはコンポーネントを手動で読み込むよ
  if (newされたとき) {
    $this->Foo = $this->Componet->load('Foo');
    $this->Foo->startup($this); // startup()を使うときはこれも手動で
    return $this->Foo->bar();
  }
}
https://book.cakephp.org/2.0/ja/controllers/components.html

#PHP #cakephp

2017年12月3日日曜日

macOS High Sierra

macOS High Sierra

アップデートしました!
Build番号は、17B1003 になっています。

MacBook Pro Mid 2012 まだまだ!

2017年11月17日金曜日

2017年10月20日金曜日

wget で github からダウンロード

Download from github with wget



ちょっと確認したいときに作ったちょっとした仮想でサクッと!

$ wget --no-check-certificate https://github.com/xxxxxxxxx/xxxxxxxxx

2017年10月19日木曜日

闘うプログラマー

Show Stopper!


原書のタイトルは「Show Stopper!

帯にもあるように

マイクロソフトの「ウィンドウズNT」開発物語

です。
初版は、1994年12月と時代は遡るのですが今でも十分ひきこまれます。
Windows NTの「NT」って「ニューテクノロジー」の略だったのか、と今更。

2017年6月29日木曜日

localstack で SQS を使ってみた

I tried using SQS with localstack.


前回の「localstack 動かしてみた」の続きです。
よく使うSQSを試してみます。

まず、awscli をインストールしておきます。
aws configure でキーなどを設定します。
awscliが有効なIAMのキーを設定しました。


早速、キューを作成します。
endpoint-url は localstackで指定されているものを指定します。
キュー名は、'test_queue' としました。
$ aws sqs create-queue --queue-name test_queue --endpoint-url http://localhost:4576
{
    "QueueUrl": "http://localhost:4576/123456789012/test_queue"
}
コマンドを実行すると、QueueUrl が返ってきました。


ダッシュボードでSQSキューが作成されていることが確認できますね。


メッセージを投入します。先程のQueueUrlを使用します。
$ aws sqs send-message --queue-url http://localhost:4576/123456789012/test_queue --message-body "localstack SQS test message." --endpoint-url http://localhost:4576
{
  "MD5OfMessageBody": "717aab0da1292d4fcfe079d9e65d9e21",
  "MD5OfMessageAttributes": "d41d8cd98f00b204e9800998ecf8427e",
  "MessageId": "51f95e5f-ecc9-a7a4-b96c-34f4bd96c696"
}


メッセージを受信します。
$ aws sqs receive-message --queue-url http://localhost:4576/123456789012/test_queue --endpoint-url http://localhost:4576
{
  "Messages": [
    {
      "Body": "localstack SQS test message.",
      "ReceiptHandle":                 "uxrkvdeiigmwuxhybxoooxkqdhukasjjkwrskpkfrdqwfdxhhswvjbzujubxtijlzltmvzomjnsnbziieetwcurrenkbhrgdonkysxechxbjjylgrhhtxcdmtznjlgbjwsbayuefgsuugdvdzdokjvdprrifdlbaykhrdxunwmehqakfsxogqsunj",
      "MD5OfBody": "717aab0da1292d4fcfe079d9e65d9e21",
      "MD5OfMessageAttributes": "d41d8cd98f00b204e9800998ecf8427e",
      "MessageId": "51f95e5f-ecc9-a7a4-b96c-34f4bd96c696",
      "Attributes": {
        "ApproximateFirstReceiveTimestamp": "1.49866313563e+12",
        "SenderId": "AIDAIT2UOQQY3AUEKVGXU",
        "ApproximateReceiveCount": "1",
        "SentTimestamp": "1.4986630244e+12"
      }
    }
  ]
}

受信できました!
MessagesのBody にちゃんと送信したメッセージが入っていますね。
また、MessageId も送信したときと同じです。


ちなみに、aws configure ですが、キーなどダミーでも動きました。これ重要です。

イイネ!

2017年6月15日木曜日

localstack 動かしてみた


localstack

ローカルでAWS検証できるよーと教えていただきました。
SQSを検証したいのでやってみます。





git cloneしますっ

$ git clone https://github.com/atlassian/localstack.git
Cloning into 'localstack'...
remote: Counting objects: 1734, done.
remote: Compressing objects: 100% (67/67), done.
remote: Total 1734 (delta 49), reused 70 (delta 32), pack-reused 1629
Receiving objects: 100% (1734/1734), 643.27 KiB | 209.00 KiB/s, done.
Resolving deltas: 100% (1129/1129), done.

↓を参考に起動します

dockerです

$ docker run -it -p 4567-4578:4567-4578 -p 8080:8080 atlassianlabs/localstack
docker: Cannot connect to the Docker daemon at tcp://192.168.59.103:2376. Is the docker daemon running?.
See 'docker run --help'.


エラーになりますねー。ググると以下の情報がありました。


環境変数を調べます

$ export -p
declare -x DOCKER_CERT_PATH="/Users/xxxxx/.boot2docker/certs/boot2docker-vm"
declare -x DOCKER_HOST="tcp://192.168.59.103:2376"
declare -x DOCKER_TLS_VERIFY="1"

先のサイトにあったように DOCKER_某 を削除しますー

$ unset DOCKER_CERT_PATH
$ unset DOCKER_HOST
$ unset DOCKER_TLS_VERIFY


再び・・・

$ docker run -it -p 4567-4578:4567-4578 -p 8080:8080 atlassianlabs/localstack
Unable to find image 'atlassianlabs/localstack:latest' locally
latest: Pulling from atlassianlabs/localstack
a59xxxxxxxxx: Pull complete 
Digest: sha256:45xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Status: Downloaded newer image for atlassianlabs/localstack:latest
/usr/lib/python2.7/site-packages/supervisor/options.py:296: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
  'Supervisord is running as root and it is searching '
2017-06-14 15:40:19,301 CRIT Supervisor running as root (no user in config file)
2017-06-14 15:40:19,304 INFO supervisord started with pid 1
2017-06-14 15:40:20,310 INFO spawned: 'dashboard' with pid 8
2017-06-14 15:40:20,312 INFO spawned: 'infra' with pid 9
. .venv/bin/activate; PYTHONPATH=. exec localstack/mock/infra.py
(. .venv/bin/activate; bin/localstack web --port=8080)
2017-06-14 15:40:21,325 INFO success: dashboard entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
2017-06-14 15:40:21,325 INFO success: infra entered RUNNING state, process has stayed up for > than 1 seconds (startsecs)
Starting local dev environment. CTRL-C to quit.
 * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!
 * Debugger PIN: 172-913-376
Starting local Elasticsearch (port 4571)...
Starting mock ES service (port 4578)...
Starting mock S3 (port 4572)...
Starting mock SNS (port 4575)...
Starting mock SQS (port 4576)...
Starting mock API Gateway (port 4567)...
Starting mock DynamoDB (port 4569)...
Starting mock DynamoDB Streams service (port 4570)...
Starting mock Firehose service (port 4573)...
Starting mock Lambda service (port 4574)...
Starting mock Kinesis (port 4568)...
Starting mock Redshift (port 4577)...
Starting mock Route53 (port 4580)...
Starting mock SES (port 4579)...
Starting mock CloudFormation (port 4581)...
Starting mock CloudWatch (port 4582)...
[2017-06-14T15:40:29,272][INFO ][o.e.n.Node               ] [] initializing ...
(略)
Ready.

Ready.になりました!うまくいったようです!
http://localhost:8080 にアクセスします。

Ready.
となっているターミナルの続きにリクエストがズラズラ表示されます
Ready.
172.17.0.1 - - [14/Jun/2017 15:48:59] "GET / HTTP/1.1" 200 -
172.17.0.1 - - [14/Jun/2017 15:48:59] "GET /node_modules/@atlassian/aui/dist/aui/css/aui.css HTTP/1.1" 200 -
172.17.0.1 - - [14/Jun/2017 15:48:59] "GET /node_modules/@atlassian/aui/dist/aui/css/aui-experimental.css HTTP/1.1" 200 -


つづく・・・

2017年5月29日月曜日

node.js インストール


node.js install


Homebrew で nvm(Node Version Manager) をインストールします。

$ brew --version
Homebrew 1.2.1
Homebrew/homebrew-core (git revision 088b; last commit 2017-05-29)

$ brew install nvm
==> Using the sandbox
==> Downloading https://github.com/creationix/nvm/archive/v0.33.2.tar.gz
==> Downloading from https://codeload.github.com/creationix/nvm/tar.gz/v0.33.2
######################################################################## 100.0%
==> Caveats
Please note that upstream has asked us to make explicit managing
nvm via Homebrew is unsupported by them and you should check any
problems against the standard nvm install method prior to reporting.

You should create NVM's working directory if it doesn't exist:

  mkdir ~/.nvm

Add the following to ~/.bash_profile or your desired shell
configuration file:

  export NVM_DIR="$HOME/.nvm"
  . "/usr/local/opt/nvm/nvm.sh"

You can set $NVM_DIR to any location, but leaving it unchanged from
/usr/local/opt/nvm will destroy any nvm-installed Node installations
upon upgrade/reinstall.

Type `nvm help` for further information.

Bash completion has been installed to:
  /usr/local/etc/bash_completion.d
==> Summary

🍺  /usr/local/Cellar/nvm/0.33.2: 7 files, 125.4KB, built in 4 seconds


なにやらいろいろでてます。
順番に対応します。

$ mkdir ~/.nvm
$ vi .bash_profile
で export NVM_DIR を追加します。

$ source .bash_profile

ここから node.js のインストールです。
バージョンを確認します。

$ nvm ls-remote
         (略)
         v7.7.4
         v7.8.0
         v7.9.0
        v7.10.0

最新版(v7.10.0)をインストールします。

$ nvm install 7.10.0
Downloading and installing node v7.10.0...
Downloading https://nodejs.org/dist/v7.10.0/node-v7.10.0-darwin-x64.tar.gz...
######################################################################## 100.0%
Computing checksum with shasum -a 256
Checksums matched!
Now using node v7.10.0 (npm v4.2.0)
Creating default alias: default -> 7.10.0 (-> v7.10.0)

$ node --version
v7.10.0

インストール完了ですー
確認してみます。

$ nvm ls
->      v7.10.0
default -> 7.10.0 (-> v7.10.0)
node -> stable (-> v7.10.0) (default)
stable -> 7.10 (-> v7.10.0) (default)
iojs -> N/A (default)
lts/* -> lts/boron (-> N/A)
lts/argon -> v4.8.3 (-> N/A)
lts/boron -> v6.10.3 (-> N/A)

デフォルトが v7.10.0 になっていることがわかりますね。

2017年5月28日日曜日

Google Cloud SDK インストール

theaucitron

Google Cloud SDK install

↓ここからアーカイブファイルをダウンロードします。
https://cloud.google.com/sdk/docs/quickstart-mac-os-x

解凍します。
$ sudo tar -xzvf Downloads/google-cloud-sdk-145.0.0-darwin-x86_64.tar.gz -C /usr/local


インストールします。
$ /usr/local/google-cloud-sdk/install.sh
Welcome to the Google Cloud SDK!

To help improve the quality of this product, we collect anonymized usage data
and anonymized stacktraces when crashes are encountered; additional information
is available at <https://cloud.google.com/sdk/usage-statistics>. You may choose
to opt out of this collection now (by choosing 'N' at the below prompt), or at
any time in the future by running the following command:

    gcloud config set disable_usage_reporting true

Do you want to help improve the Google Cloud SDK (Y/n)?  Y

Your current Cloud SDK version is: 145.0.0
The latest available version is: 156.0.0

┌────────────────────────────────────────────────────────────────────────────────────────────────────────────────┐
│                                                   Components                                                   │
├──────────────────┬──────────────────────────────────────────────────────┬──────────────────────────┬───────────┤
│      Status      │                         Name                         │            ID            │    Size   │
├──────────────────┼──────────────────────────────────────────────────────┼──────────────────────────┼───────────┤
│ Update Available │ BigQuery Command Line Tool                           │ bq                       │   < 1 MiB │
│ Update Available │ Cloud SDK Core Libraries                             │ core                     │   6.1 MiB │
│ Update Available │ Cloud Storage Command Line Tool                      │ gsutil                   │   2.9 MiB │
│ Not Installed    │ App Engine Go Extensions                             │ app-engine-go            │  96.7 MiB │
│ Not Installed    │ Cloud Bigtable Command Line Tool                     │ cbt                      │   4.0 MiB │
│ Not Installed    │ Cloud Bigtable Emulator                              │ bigtable                 │   3.3 MiB │
│ Not Installed    │ Cloud Datalab Command Line Tool                      │ datalab                  │   < 1 MiB │
│ Not Installed    │ Cloud Datastore Emulator                             │ cloud-datastore-emulator │  15.4 MiB │
│ Not Installed    │ Cloud Datastore Emulator (Legacy)                    │ gcd-emulator             │  38.1 MiB │
│ Not Installed    │ Cloud Pub/Sub Emulator                               │ pubsub-emulator          │  21.0 MiB │
│ Not Installed    │ Emulator Reverse Proxy                               │ emulator-reverse-proxy   │  14.5 MiB │
│ Not Installed    │ Google Container Registry's Docker credential helper │ docker-credential-gcr    │   2.3 MiB │
│ Not Installed    │ gcloud Alpha Commands                                │ alpha                    │   < 1 MiB │
│ Not Installed    │ gcloud Beta Commands                                 │ beta                     │   < 1 MiB │
│ Not Installed    │ gcloud app Java Extensions                           │ app-engine-java          │ 132.2 MiB │
│ Not Installed    │ gcloud app PHP Extensions (Mac OS X)                 │ app-engine-php-darwin    │  21.9 MiB │
│ Not Installed    │ gcloud app Python Extensions                         │ app-engine-python        │   6.2 MiB │
│ Not Installed    │ kubectl                                              │ kubectl                  │  14.8 MiB │
│ Installed        │ Default set of gcloud commands                       │ gcloud                   │           │
└──────────────────┴──────────────────────────────────────────────────────┴──────────────────────────┴───────────┘
To install or remove components at your current SDK version [145.0.0], run:
  $ gcloud components install COMPONENT_ID
  $ gcloud components remove COMPONENT_ID

To update your SDK installation to the latest version [156.0.0], run:
  $ gcloud components update


Modify profile to update your $PATH and enable shell command 
completion? (Y/n)?  Y

The Google Cloud SDK installer will now prompt you to update an rc 
file to bring the Google Cloud CLIs into your environment.

Enter a path to an rc file to update, or leave blank to use 
[/Users/xxxxx/.bash_profile]:  
Backing up [/Users/xxxxx/.bash_profile] to [/Users/xxxxx/.bash_profile.backup].
[/Users/xxxxx/.bash_profile] has been updated.

==> Start a new shell for the changes to take effect.


For more information on how to get started, please visit:
  https://cloud.google.com/sdk/docs/quickstarts


シェルを再起動します。
$ exec -l $SHELL

SDKを初期化します。
$ sudo gcloud init
Welcome! This command will take you through the configuration of gcloud.

Settings from your current configuration [default] are:
Your active configuration is: [default]

[core]
account = xxxxx@gmail.com
disable_usage_reporting = False

Pick configuration to use:
 [1] Re-initialize this configuration [default] with new settings 
 [2] Create a new configuration
Please enter your numeric choice:  1

Your current configuration has been set to: [default]

You can skip diagnostics next time by using the following flag:
  gcloud init --skip-diagnostics

Network diagnostic detects and fixes local network connection issues.
Checking network connection...done.                                                                                             
Reachability Check passed.
Network diagnostic (1/1 checks) passed.

Choose the account you would like use to perform operations for this 
configuration:
 [1] xxxxx@gmail.com
 [2] Log in with a new account
Please enter your numeric choice:  1

You are logged in as: [xxxxx@gmail.com].


This account has no projects. Please create one in developers console (https://console.developers.google.com/project) before running this command.

コンポーネントをアップデートします。
$ sudo gcloud components update
Your current Cloud SDK version is: 145.0.0
You will be upgraded to version: 156.0.0


以上、ローカルへのSDKインストールでしたー

2017年5月27日土曜日

ssh github

by Sky Eckstrom

ssh github

~ $ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/Users/xxxxx/.ssh/id_rsa): 
/Users/xxxxx/.ssh/id_rsa already exists.
Overwrite (y/n)? y
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /Users/xxxxx/.ssh/id_rsa.
Your public key has been saved in /Users/xxxxx/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
The key's randomart image is:
+---[RSA 2048]----+
|xxxxxxx          |
|xxxxxxx          |
|xxxxxxx          |
|xxxxxxx          |
|xxxxxxx          |
|xxxxxxx          |
|xxxxxxx          |
+----[SHA256]-----+
~ $ cd .ssh
.ssh $ vi config

(ここで config を編集します)

(githubに鍵を設定します)
SSH認証キーをGitHubへ設定する。(Mac用)- qiita

(↓接続確認します)
.ssh $ ssh github
The authenticity of host 'github.com (192.30.255.112)' can't be established.
RSA key fingerprint is SHA256:xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.255.112' (RSA) to the list of known hosts.
PTY allocation request failed on channel 0
Hi xxxxx! You've successfully authenticated, but GitHub does not provide shell access.
Connection to github.com closed.


2017年5月16日火曜日

ドライブシャフトブーツ交換

Drive shaft boots exchange


左のドライブシャフトブーツからグリスが漏れているようなので交換します。
Amazonでポチッと。届いたパーツはこんな感じ。

はじめての作業ですw
うまをかけて外したタイヤをボディの下に入れておきます。ジャッキも一応かけておきます。

ダンボールを下にひきます。ロアアームベトベトです。
ブーツをカッターで切って外します。ベトベトなので写真なし。
蛇腹に亀裂はなかったです。が、かなり固くなっていたのでタイヤ側がずれたのかなと思います。
ちなみに、スタビロッド(画像右のほうに写っている縦の棒)は車検のときに交換済みです。

古いグリスを拭き取りました。少し残っていますが。。。
ここに新しいグリスを充填します。

タイヤ側から分割部分を接合していきます。ここ時間かかりました。
位置をあわせて金属バンドで固定します。

いまのところ大丈夫のようです。
はじめての作業でしたが、説明書がわかり易く迷うことはありませんでした。
分割部分のはめ込みに時間がかかったくらい

当初、レンタルピット http://shinwajikou.jp/ の利用を考えていたのですが、土日は予約でいっぱいとのこと。
フロアジャッキとジャッキスタンドをホームセンターで購入しました。
Amazonより安かった!

次は右側か。。。

2017年5月14日日曜日

Samsung SSD 500GB 850 EVO

Samsung SSD 500GB 850 EVO

MacBook Pro (13-inch, Mid 2012) 
SSDへ換装しました。画像の上がSSD、下がHDDです。
側面のネジ、サイズのあうアーレンキーがなかったのでペンチでクルッと。


TimeMachineで入れ替えついでにOSも macOS Sierra(10.12.4) へアップグレードしました。
メモリ16GB, SSD 500GB。まだいける!

2017年2月28日火曜日

Docker for Mac

Docker for Mac


こちらからインストール

ターミナルで確認
~ $ docker --version
Docker version 1.13.1, build 092cba3
~ $ docker-compose --version
docker-compose version 1.11.1, build 7c5d5e4
~ $ docker --version
Docker version 1.13.1, build 092cba3
~ $ docker-machine --version
docker-machine version 0.9.0, build 15fd4c7

hello-world
~ $ docker run hello-world
docker: Cannot connect to the Docker daemon at tcp://192.168.59.103:2376. Is the docker daemon running?.
See 'docker run --help'.
エラー!?

sudo つけてみた、、、
~ $ sudo docker run hello-world
Password:
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
78445dd45222: Pull complete
Digest:
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
https://cloud.docker.com/
For more examples and ideas, visit:
https://docs.docker.com/engine/userguide/

web server
~ $ docker run -d -p 80:80 --name webserver nginx
docker: Cannot connect to the Docker daemon at tcp://192.168.59.103:2376. Is the docker daemon running?. See 'docker run --help'.
エラー!?

sudoつけてみた、、、
~ $ sudo docker run -d -p 80:80 --name webserver nginx
Password:
Unable to find image 'nginx:latest' locally
latest: Pulling from library/nginx
5040bd298390: Pull complete
31123d939af1: Pull complete
23f1bdd267a9: Pull complete
Digest:
Status: Downloaded newer image for nginx:latest

ブラウザで localhost みると、、、








オーケー!

プロセスみてみる、、、sudoつけてね
~ $ sudo docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
9e4134e2e67d nginx "nginx -g 'daemon ..." 17 minutes ago Up 16 minutes 0.0.0.0:80->80/tcp, 443/tcp webserver

nginxが動いているね。

webserver を止めてみる、、、
~ $ sudo docker stop webserver
webserver
~ $ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6ed0928c3844 hello-world "/hello" 7 minutes ago Exited (0) 7 minutes ago kind_bhabha
9e4134e2e67d nginx "nginx -g 'daemon ..." 19 minutes ago Exited (0) 9 seconds ago webserver

nginxがExitedしているね。

webserverのコンテナを削除してみる、、、
~ $ sudo docker rm -f webserver
webserver
~ $ sudo docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6ed0928c3844 hello-world "/hello" 8 minutes ago Exited (0) 8 minutes ago kind_bhabha

削除されているね。


以上、

Get started with Docker for Mac

でした。