File tree Expand file tree Collapse file tree 7 files changed +20
-6
lines changed
Expand file tree Collapse file tree 7 files changed +20
-6
lines changed Original file line number Diff line number Diff line change 1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414# limitations under the License.
15+ ARG BASE_IMAGE=quay.io/devfile/devfile-index-base:next
16+
1517FROM registry.access.redhat.com/ubi8/go-toolset:1.21 AS builder
1618
1719# Set user as root
@@ -42,6 +44,6 @@ RUN bash /registry-support/build-tools/build.sh /registry /build
4244# Set user as non-root
4345USER 1001
4446
45- FROM quay.io/devfile/devfile-index-base:next
47+ FROM ${BASE_IMAGE}
4648
4749COPY --from=builder /build /registry
Original file line number Diff line number Diff line change 1212# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1313# See the License for the specific language governing permissions and
1414# limitations under the License.
15+ ARG BASE_IMAGE=quay.io/devfile/devfile-index-base:next
16+
1517FROM registry.access.redhat.com/ubi8/go-toolset:1.21 AS builder
1618
1719# Set user as root
@@ -50,7 +52,7 @@ RUN bash /registry-support/build-tools/build.sh /registry /build
5052# Extract archived resources
5153RUN bash /registry-support/build-tools/extract_resources.sh
5254
53- FROM quay.io/devfile/devfile-index-base:next
55+ FROM ${BASE_IMAGE}
5456
5557# Set user as non-root
5658USER 1001
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
2020# Due to command differences between podman and docker we need to separate the process
2121# for creating and adding images to a multi-arch manifest
2222podman=${USE_PODMAN:- false}
23+ # Base index server image
24+ BASE_IMAGE=${BASE_IMAGE:- ' quay.io/devfile/devfile-index-base:next' }
2325# Base Repository
2426BASE_REPO=" quay.io/devfile/devfile-index"
2527BASE_TAG=" next"
@@ -32,7 +34,7 @@ if [ ${podman} == true ]; then
3234
3335 podman manifest create " $DEFAULT_IMG "
3436
35- podman build --platform=" $PLATFORMS " --manifest " $DEFAULT_IMG " --no-cache -f $ABSOLUTE_PATH /Dockerfile $ABSOLUTE_PATH /..
37+ podman build --platform=" $PLATFORMS " --manifest " $DEFAULT_IMG " --no-cache --build-arg BASE_IMAGE= ${BASE_IMAGE} - f $ABSOLUTE_PATH /Dockerfile $ABSOLUTE_PATH /..
3638
3739 podman manifest push " $DEFAULT_IMG "
3840
4547
4648 docker buildx use index-builder
4749
48- docker buildx build --push --platform=" $PLATFORMS " --tag " $DEFAULT_IMG " --provenance=false --no-cache -f $ABSOLUTE_PATH /Dockerfile $ABSOLUTE_PATH /..
50+ docker buildx build --push --platform=" $PLATFORMS " --tag " $DEFAULT_IMG " --provenance=false --no-cache --build-arg BASE_IMAGE= ${BASE_IMAGE} - f $ABSOLUTE_PATH /Dockerfile $ABSOLUTE_PATH /..
4951
5052 docker buildx rm index-builder
5153
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ shopt -s expand_aliases
1616
1717ABSOLUTE_PATH=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
1818USE_PODMAN=${USE_PODMAN:- false}
19+ # Base index server image
20+ BASE_IMAGE=${BASE_IMAGE:- ' quay.io/devfile/devfile-index-base:next' }
1921DEFAULT_ARCH=" linux/amd64"
2022
2123# Check if different architecture was passed for image build
3436
3537if [ $# -eq 1 ] && [ $1 == " offline" ]
3638then
37- docker build --no-cache --platform " ${arch} " -t devfile-index -f $ABSOLUTE_PATH /Dockerfile.offline $ABSOLUTE_PATH /..
39+ docker build --no-cache --platform " ${arch} " -t devfile-index --build-arg BASE_IMAGE= ${BASE_IMAGE} - f $ABSOLUTE_PATH /Dockerfile.offline $ABSOLUTE_PATH /..
3840else
39- docker build --no-cache --platform " ${arch} " -t devfile-index -f $ABSOLUTE_PATH /Dockerfile $ABSOLUTE_PATH /..
41+ docker build --no-cache --platform " ${arch} " -t devfile-index --build-arg BASE_IMAGE= ${BASE_IMAGE} - f $ABSOLUTE_PATH /Dockerfile $ABSOLUTE_PATH /..
4042fi
Original file line number Diff line number Diff line change 1+ # Use Konflux built base image
2+ BASE_IMAGE=quay.io/redhat-services-prod/devfiles-tenant/devfile-registry-main/devfile-registry-base-main
Original file line number Diff line number Diff line change 3030 value : .ci/Dockerfile
3131 - name : path-context
3232 value : .
33+ - name : build-args-file
34+ value : .ci/konflux.argfile.conf
3335 pipelineSpec :
3436 description : |
3537 This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
Original file line number Diff line number Diff line change 2727 value : .ci/Dockerfile
2828 - name : path-context
2929 value : .
30+ - name : build-args-file
31+ value : .ci/konflux.argfile.conf
3032 pipelineSpec :
3133 description : |
3234 This pipeline is ideal for building container images from a Containerfile while reducing network traffic.
You can’t perform that action at this time.
0 commit comments