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 12
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
+ ARG BASE_IMAGE=quay.io/devfile/devfile-index-base:next
16
+
15
17
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 AS builder
16
18
17
19
# Set user as root
@@ -42,6 +44,6 @@ RUN bash /registry-support/build-tools/build.sh /registry /build
42
44
# Set user as non-root
43
45
USER 1001
44
46
45
- FROM quay.io/devfile/devfile-index-base:next
47
+ FROM ${BASE_IMAGE}
46
48
47
49
COPY --from=builder /build /registry
Original file line number Diff line number Diff line change 12
12
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
13
# See the License for the specific language governing permissions and
14
14
# limitations under the License.
15
+ ARG BASE_IMAGE=quay.io/devfile/devfile-index-base:next
16
+
15
17
FROM registry.access.redhat.com/ubi8/go-toolset:1.21 AS builder
16
18
17
19
# Set user as root
@@ -50,7 +52,7 @@ RUN bash /registry-support/build-tools/build.sh /registry /build
50
52
# Extract archived resources
51
53
RUN bash /registry-support/build-tools/extract_resources.sh
52
54
53
- FROM quay.io/devfile/devfile-index-base:next
55
+ FROM ${BASE_IMAGE}
54
56
55
57
# Set user as non-root
56
58
USER 1001
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ ABSOLUTE_PATH="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
20
20
# Due to command differences between podman and docker we need to separate the process
21
21
# for creating and adding images to a multi-arch manifest
22
22
podman=${USE_PODMAN:- false}
23
+ # Base index server image
24
+ BASE_IMAGE=${BASE_IMAGE:- ' quay.io/devfile/devfile-index-base:next' }
23
25
# Base Repository
24
26
BASE_REPO=" quay.io/devfile/devfile-index"
25
27
BASE_TAG=" next"
@@ -32,7 +34,7 @@ if [ ${podman} == true ]; then
32
34
33
35
podman manifest create " $DEFAULT_IMG "
34
36
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 /..
36
38
37
39
podman manifest push " $DEFAULT_IMG "
38
40
45
47
46
48
docker buildx use index-builder
47
49
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 /..
49
51
50
52
docker buildx rm index-builder
51
53
Original file line number Diff line number Diff line change @@ -16,6 +16,8 @@ shopt -s expand_aliases
16
16
17
17
ABSOLUTE_PATH=" $( cd " $( dirname " ${BASH_SOURCE[0]} " ) " && pwd) "
18
18
USE_PODMAN=${USE_PODMAN:- false}
19
+ # Base index server image
20
+ BASE_IMAGE=${BASE_IMAGE:- ' quay.io/devfile/devfile-index-base:next' }
19
21
DEFAULT_ARCH=" linux/amd64"
20
22
21
23
# Check if different architecture was passed for image build
34
36
35
37
if [ $# -eq 1 ] && [ $1 == " offline" ]
36
38
then
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 /..
38
40
else
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 /..
40
42
fi
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 30
30
value : .ci/Dockerfile
31
31
- name : path-context
32
32
value : .
33
+ - name : build-args-file
34
+ value : .ci/konflux.argfile.conf
33
35
pipelineSpec :
34
36
description : |
35
37
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 27
27
value : .ci/Dockerfile
28
28
- name : path-context
29
29
value : .
30
+ - name : build-args-file
31
+ value : .ci/konflux.argfile.conf
30
32
pipelineSpec :
31
33
description : |
32
34
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