クラス DockerApi.ContainerApi
java.lang.ObjectSE
org.springframework.boot.buildpack.platform.docker.DockerApi.ContainerApi
- 含まれているクラス:
DockerApi
コンテナー操作用の Docker API。
- 導入:
- 2.3.0
- 作成者:
- Phillip Webb, Scott Frederick, Rafael Ceccone, Moritz Halbritter
方法の概要
修飾子と型メソッド説明create(ContainerConfig config, @Nullable ImagePlatform platform, ContainerContent... contents) 新しいコンテナーContainerConfigを作成します。voidlogs(ContainerReference reference, UpdateListener<LogUpdateEvent> listener) 特定のコンテナーのログを返し、フォローします。voidremove(ContainerReference reference, boolean force) 特定のコンテナーを削除します。voidstart(ContainerReference reference) 特定のコンテナーを起動します。wait(ContainerReference reference) コンテナーが停止してステータスを取得するまで待ちます。
メソッドの詳細
create
public ContainerReference create(ContainerConfig config, @Nullable ImagePlatform platform, ContainerContent... contents) throws IOExceptionSE 新しいコンテナーContainerConfigを作成します。- パラメーター:
config- コンテナー構成platform- コンテナーを作成するイメージのプラットフォーム (OS/ アーキテクチャ / バリアント)contents- 含める追加コンテンツ- 戻り値:
- 新しく作成されたコンテナーの
ContainerReference - 例外:
IOExceptionSE- IO エラー時
start
特定のコンテナーを起動します。- パラメーター:
reference- 開始するコンテナー参照- 例外:
IOExceptionSE- IO エラー時
logs
public void logs(ContainerReference reference, UpdateListener<LogUpdateEvent> listener) throws IOExceptionSE 特定のコンテナーのログを返し、フォローします。- パラメーター:
reference- コンテナーリファレンスlistener- ログ更新イベントを受信するリスナー- 例外:
IOExceptionSE- IO エラー時
wait
コンテナーが停止してステータスを取得するまで待ちます。- パラメーター:
reference- コンテナーリファレンス- 戻り値:
- コンテナーの終了ステータスを示す
ContainerStatus - 例外:
IOExceptionSE- IO エラー時
remove
特定のコンテナーを削除します。- パラメーター:
reference- 削除するコンテナーforce- 削除を強制する必要がある場合- 例外:
IOExceptionSE- IO エラー時