Skip to content

Commit aebc3b3

Browse files
authored
[Build] Restructure ironbank docker image build (elastic#135668) (elastic#135721)
We remove the shared dockerfile template in favor of a explicit ironbank image, similar to default and wolfi images. We also remove a test `test310IronBankImageHasNoAdditionalLabels` which basically just tested proper distinction in our shared dockerfile which is now not required anymore. This test started failing as redhat started to add org.opencontainers.image.revision tag
1 parent ba04027 commit aebc3b3

File tree

5 files changed

+141
-291
lines changed

5 files changed

+141
-291
lines changed

build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ public enum DockerBase {
1717
DEFAULT("redhat/ubi9-minimal:latest", "", "microdnf", "dockerfiles/default/Dockerfile"),
1818

1919
// The Iron Bank base image is UBI (albeit hardened), but we are required to parameterize the Docker build
20-
IRON_BANK("${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}", "-ironbank", "yum", "Dockerfile"),
20+
IRON_BANK("${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}", "-ironbank", "yum", "dockerfiles/ironbank/Dockerfile"),
2121

2222
// Chainguard based wolfi image with latest jdk
2323
WOLFI(

distribution/docker/README.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,11 @@ custom behaviour in the
134134

135135
We go to some lengths to try and make the Docker build resilient to transient
136136
network errors. This is why, when browsing the
137-
[Dockerfile](src/docker/Dockerfile), you'll see many commands wrapped in looping
138-
logic, so that if e.g. package installation fails, we try again. We also perform
137+
[Dockerfile](src/docker/dockerfiles/wolfi/Dockerfile), you'll see many commands wrapped in looping
138+
logic, so that if e.g. package installation fails, we try again.
139+
Our default docker image and the Iron Bank image do not have this retry logic,
140+
because Dockerhub and Iron Bank asked for as concise as possible Dockerfiles.
141+
We also perform
139142
explicit `docker pull` commands instead of relying on `docker run` to pull an
140143
image down automatically, so that we can wrap the `pull` part in a retry.
141144

distribution/docker/src/docker/Dockerfile

Lines changed: 0 additions & 271 deletions
This file was deleted.

0 commit comments

Comments
 (0)