Skip to content

Commit 0d80f21

Browse files
[chore] Use fully qualified container names in builds. (#1925)
1 parent d963d60 commit 0d80f21

File tree

1 file changed

+18
-4
lines changed

1 file changed

+18
-4
lines changed

Makefile

+18-4
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,27 @@ CONTAINER_REPOSITORY=docker.io
2626
# Per container overrides for the repository resolution.
2727
WEAVER_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)
2828
SEMCONVGEN_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)
29+
OPA_CONTAINER_REPOSITORY=$(CONTAINER_REPOSITORY)
2930

30-
# Fully qualified references to containers used in this Makefile.
31+
# Versioned, non-qualified references to containers used in this Makefile.
3132
# These are parsed from dependencies.Dockerfile so dependabot will autoupdate
3233
# the versions of docker files we use.
33-
WEAVER_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="weaver" {print $$2}')
34-
SEMCONVGEN_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="semconvgen" {print $$2}')
35-
OPA_CONTAINER=$(shell cat dependencies.Dockerfile | awk '$$4=="opa" {print $$2}')
34+
VERSIONED_WEAVER_CONTAINER_NO_REPO=$(shell cat dependencies.Dockerfile | awk '$$4=="weaver" {print $$2}')
35+
VERSIONED_SEMCONVGEN_CONTAINER_NO_REPO=$(shell cat dependencies.Dockerfile | awk '$$4=="semconvgen" {print $$2}')
36+
VERSIONED_OPA_CONTAINER_NO_REPO=$(shell cat dependencies.Dockerfile | awk '$$4=="opa" {print $$2}')
37+
38+
# Fully qualified references to containers used in this Makefile. These
39+
# include the container repository, so that the build will work with tools
40+
# like "podman" with a default "/etc/containers/registries.conf", where
41+
# a default respository of "docker.io" is not assumed. This is intended to
42+
# eliminate errors from podman such as:
43+
#
44+
# Error: short-name "otel/weaver:v1.2.3" did not resolve to an alias
45+
# and no unqualified-search registries are defined in "/etc/containers/registries.conf"
46+
WEAVER_CONTAINER=$(WEAVER_CONTAINER_REPOSITORY)/$(VERSIONED_WEAVER_CONTAINER_NO_REPO)
47+
SEMCONVGEN_CONTAINER=$(SEMCONVGEN_CONTAINER_REPOSITORY)/$(VERSIONED_SEMCONVGEN_CONTAINER_NO_REPO)
48+
OPA_CONTAINER=$(OPA_CONTAINER_REPOSITORY)/$(VERSIONED_OPA_CONTAINER_NO_REPO)
49+
3650

3751
DOCKER_USER=$(shell id -u):$(shell id -g)
3852

0 commit comments

Comments
 (0)