やりたいこと 外部API叩きたい -> モックサーバ欲しい でも環境は汚したくない -> Docker コーディングもしたくない -> WireMock(リクエストとそれに対応するレスポンスをjsonで定義) 準備 WireMockがインストールされてるイメージないかなと探したらありました。 DockerHub GitHub とりあえず動作検証として用意されてるサンプルを動かしてみる。 サンプルを取得 git clone https://github.com/rodolpheche/wiremock-docker.git 必要なものは以下wiremock-docker/samples/hello/stubs stubs ├── __files │ └── hello.json <- レスポンス(json) └── mappings └── hello.json <- リクエストに対するレス