docker build -t $yourTag --build-arg NEXTCLOUD_TAG=$nextcloudTag .
# For example:
docker build -t thumbscrew/nextcloud:27.1.1 -t thumbscrew/nextcloud:latest --build-arg NEXTCLOUD_TAG=27.1.1-apache .
Check the Github releases to see what tags are available
docker pull public.ecr.aws/m5x6c8x3/nextcloud:27.1.1