diff --git a/hack/Makefile.debug b/hack/Makefile.debug index f4a5cc42e..d26b460d1 100644 --- a/hack/Makefile.debug +++ b/hack/Makefile.debug @@ -14,9 +14,7 @@ new-openshift-router-image: new-ci-router-image: $(IMAGEBUILDER) build -t $(IMAGE_BASE):$(TAG) -f images/router/base/Dockerfile.rhel . - cp -f images/router/haproxy/Dockerfile.rhel8 images/router/haproxy/Dockerfile.rhel8.debug - sed -i "s|FROM .*|FROM $(IMAGE_BASE):$(TAG)|" images/router/haproxy/Dockerfile.rhel8.debug - $(IMAGEBUILDER) build -t $(IMAGE):$(TAG) -f images/router/haproxy/Dockerfile.rhel8.debug . + $(IMAGEBUILDER) build -t $(IMAGE):$(TAG) -f images/router/haproxy/Dockerfile.rhel8 --build-arg="BASE=$(IMAGE_BASE):$(TAG)" . push: $(IMAGEBUILDER) tag $(IMAGE):$(TAG) $(REGISTRY)/$(IMAGE):$(TAG) diff --git a/images/router/haproxy/Dockerfile.rhel8 b/images/router/haproxy/Dockerfile.rhel8 index 872ddb29e..0ef7fa6ab 100644 --- a/images/router/haproxy/Dockerfile.rhel8 +++ b/images/router/haproxy/Dockerfile.rhel8 @@ -1,4 +1,5 @@ -FROM registry.ci.openshift.org/ocp/4.16:haproxy-router-base +ARG BASE=registry.ci.openshift.org/ocp/4.16:haproxy-router-base +FROM ${BASE} RUN INSTALL_PKGS="socat haproxy28 rsyslog procps-ng util-linux" && \ yum install -y $INSTALL_PKGS && \ rpm -V $INSTALL_PKGS && \