Launcher pulls an update on ‘enter app’

AI-generated summary

The discussion revolves around the launcher enter app command on ARM systems, where it unexpectedly triggers a pull_image operation. Isambard notes that the launcher always pulls the image on ARM, citing a script condition that forces a pull if the image is not found or if ARM is detected as experimental. pfaffman explains this behavior is intentional to ensure users don’t forget to update. However, Ed_S points out a discrepancy: on Intel systems, the script checks for updates, but on ARM, it always pulls due to the use of a fixed tag. This results in ARM receiving the latest image (17 hours old), while Intel gets an older one (15 days old), raising questions about whether ARM is still considered experimental and if the current handling is necessary given the maturity of ARM support.

I’m seeing strange behaviour which I’m assuming is a bug:

On ARM systems, when you do ./launcher enter app it does a pull_image. I’m guessing it is due to this:

# 4. discourse docker image is downloaded
  3   test=`$docker_path images | awk '{print $1 ":" $2 }' | grep "$image"`
  2 
  1   # arm experimental support is on a fixed tag, always pull
227   if [ -z "$test" ] || [ $arm = true ]; then
  1     echo
  2     echo "WARNING: We are about to start downloading the Discourse base image"
  3     echo "This process may take anywhere between a few minutes to an hour, depending on your network speed"
  4     echo
  5     echo "Please be patient"
  6     echo
  7 
  8     pull_image
  9   fi

Is there a reason to do a pull_image on entering the docker or is this a bug?

Launcher always does a pull because people won’t do it themselves.

If you want to avoid keeping things up to date and know why you’re doing that, then you can instead do a

docker exec -it app bash

to get into the container

I think there’s more than that in this case, because on Intel the script checks to see if a new image is available, but on ARM it will always pull. The reason given is that ARM always uses a fixed tag. For example, today, we see in the launcher script two possibilities:
image="discourse/base:2.0.20240825-0027"
or
image="discourse/base:aarch64"
and as you see, one of those is maintained carefully as new images are approved, and the other is left to the position of the tag.

The relevant parts of the script are nearly 3 years old. I wonder, is ARM still so experimental that it needs this different handling?

As it turns out, then, the Intel image which will be pulled is presently 15 days old and sits on the 8th page of listings of base images, whereas the ARM image is the latest image and just 17 hours old.