A few months ago, the --label property to build was added that adds labels (#846). Unfortunately it seems that this only works when a devcontainer is build that is based directly from an image. If it is based from a Dockerfile, the labels from --label are not added.
I added a test in a PR that shows the problem, see here: #929