Which command only updates the Docker image?

Which command is used to update only the Docker image?

/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

My use case is:
Currently, during the build process, if a Docker image update is required but the server’s network connection is poor, the process gets stuck at the image update step for a very long time. I would like to have a dedicated command for updating the Docker image, so that I can update the image in advance separately and then build the code without any rush. For example:

./launcher pull-docker

I know I can manually create a working version, but I would still prefer if the official team could provide one.

hmmm, only way i know is to first update the launcher script:

cd /var/discourse
git pull

then find the default image tag the launcher is using:

grep -m1 '^image=' launcher

the output should look like:

image="discourse/base:2.0.20260915-0028"

then run:

docker pull discourse/base:2.0.20260915-0028

then when you run ./launcher rebuild app it should skip the download i think.

it should say Status: Image is up to date for discourse/base:2.0.20260915-0028 when you run the rebuild…

Thanks for the reply. I’m currently updating using a similar method, but it’s quite cumbersome. I’d like to write my own automation script, but I’m worried about potential incompatibility after official updates.

you can do it with an executable bash script and even use a cron job to automate it. not sure why it would become incompatible any time soon.

What I mean is that it might become incompatible in the future, and I may need to check this script every single time, which undoubtedly adds extra work. I’m just assuming the worst-case scenario :joy:. Of course, when it comes to solving the problem, let’s just get started first and adjust as we go.