0
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 3 years have passed since last update.

redoc-cliのDocker Imageを作成してDockerHubに登録する

Posted at

OpenAPI v3を試すために、環境を用意するところから始めたかったが、redoc-cliは公式でdocker imageがなさそうだったので作って登録しておいた。

cliでチマチマ作業するのは好きではないので、intelliJを使いました。
本記事は、その作業の備忘録です。

用意したもの

  • githubアカウント
  • DockerHubアカウント
  • intteliJ
  • Docker Desktop for Mac

作業

githubにリポジトリを作成する

Docker Hubにリポジトリを作成する

https://hub.docker.com/r/exthirix/redoc-cli
とりあえず作るだけ。自動ビルド設定は後回し。

intelliJ で Dockerfile を作成する

https://github.com/hidekingerz/redoc-cli/blob/master/Dockerfile
master ブランチ に push しておく。

intelliJ で Dockerfile から Image をビルドする。

Run/Debug Configurations でぽちぽちするだけ。
設定したら Run してイメージを作っておく。
dockerfile.png

イメージからコンテナを作成する

Run/Debug Configurations でぽちぽちするだけ。
コンテナができるので動作確認する。

container.png

Docker Hub に push する

InterlliJ から DockerHub にpushできるので、ぽちぽちするだけ。
Pushには少し時間が書かかるので待ちましょう。
push.png

Docker Hub で Dockerfile を公開するために github と連動させる

Automated Buildを設定すれば良い。設定したら、Save and Build を実行すると、しばらく立ってから build されて公開される。

dockerHubManage.png

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