哪个命令是只更新docker镜像的

AI 生成的摘要

singi2016cn 询问 Discourse 是否有仅用于更新 Docker 镜像的命令。用户指出,在服务器网络状况不佳时,构建过程往往卡在拉取镜像阶段,耗时极长。为了解决这个问题,用户希望官方能提供一个类似 ./launcher pull-docker 的专用命令,以便提前单独更新镜像,从而在后续构建代码时更加从容。虽然用户知道可以手动编写脚本实现该功能,但仍建议官方直接集成此功能以优化体验。

哪个命令是只更新docker镜像的。

/var/discourse# ./launcher -h
Usage: launcher COMMAND CONFIG [--skip-prereqs] [--docker-args STRING]
Commands:
    start:       Start/initialize a container
    stop:        Stop a running container
    restart:     Restart a container
    destroy:     Stop and remove a container
    enter:       Open a shell to run commands inside the container
    logs:        View the Docker logs for a container
    bootstrap:   Bootstrap a container for the config based on a template
    run:         Run the given command with the config in the context of the last bootstrapped image
    rebuild:     Rebuild a container (destroy old, bootstrap, start new)
    cleanup:     Remove all containers that have stopped for > 24 hours
    start-cmd:   Generate docker command used to start container

Options:
    --skip-prereqs             Don't check launcher prerequisites
    --docker-args              Extra arguments to pass when running docker
    --skip-mac-address         Don't assign a mac address
    --run-image                Override the image used for running the container

我的场景是:
现在构建时,如果需要更新docker镜像,而服务器的网络又很糟糕时,那就卡在更新镜像这一步很久很久了。希望能有一个专门更新docker镜像的命令,那我就可以提前单独更新好镜像,然后从容的构建代码了。例如:

./launcher pull-docker

我知道可以手动搓一个还能用的版本,但是我还是希望官方能出一个。