要將容器保存為鏡像,可以使用以下步驟:
docker ps
docker stop <容器ID>
docker commit <容器ID> <鏡像名稱>
docker images
docker run -d <鏡像名稱>
通過以上步驟,您可以將容器保存為鏡像并重新使用該鏡像來創建新的容器。