Is there an elegant way to use a Dockerfile argument to tag an image?
You can use a Makefile for this:

PHPBB_VERSION := 3.2.4

build:
    docker build \
        --build-arg PHPBB_VERSION=${PHPBB_VERSION} \
        --tag phpbb:${PHPBB_VERSION} - &lt; Dockerfile


Dockerfile:

FROM php:7.2-cli                                                                           

ARG PHPBB_VERSION                                                                          

RUN wget -nv -O- https://github.com/phpbb/phpbb/archive/release-${PHPBB_VERSION}.tar.gz | \
    tar xzf - --strip-components=1                                                         


Then, in a shell: make build.