1
0

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.

SwaggerをDockerで動かしてみる(環境構築)

Last updated at Posted at 2019-07-25

目的

  • この記事はswaggerってどんなの?という興味から環境を構築することを目的としています
  • 環境はMac上のDockerに構築します
  • Swaggerとは?は今回は省略させていただきます
  • とりあえず使うために環境を構築します

環境構築

swagger-editorのイメージをpullする

$ docker pull swaggerapi/swagger-editor
Using default tag: latest
latest: Pulling from swaggerapi/swagger-editor
c1e54eec4b57: Pull complete
d6be30a0b011: Pull complete
3411dc04207b: Pull complete
5132fc99899b: Pull complete
dac4d9c224f9: Pull complete
1d31946306a3: Pull complete
d4515043d87f: Pull complete
066a1be8377c: Pull complete
fee7d6dc2c3f: Pull complete
a66346961765: Pull complete
c23eb21da1b0: Pull complete
Digest: sha256:bba955d2aae718727bd54c4d16733b2130ba72c79ed40ca847e83b40a8f905f8
Status: Downloaded newer image for swaggerapi/swagger-editor:latest

swaggerの起動

今回はDocker側は8080ポート。mac側は10080ポートで動かすことにしました
※swaggerは8080ポートで動作しているようなので、今回はdocker側は8080ポートとしました

$ docker run -d -p 18180:8080 swaggerapi/swagger-editor

swaggerの起動確認

$ docker ps
CONTAINER ID    IMAGE    COMMAND    CREATED    STATUS    PORTS    NAMES
036b88f2f7ea    swaggerapi/swagger-editor    "sh /usr/share/nginx…"    3 seconds ago    Up 2 seconds    8080/tcp, 0.0.0.0:18180->8080/tcp    adoring_cocks

ブラウザで確認してみる

screenshot-20190724184235.png

参考:http://tokyo.supersoftware.co.jp/code/8592

1
0
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
1
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?