Skip to content

Cleanup Ironbank only dockerfile #128198

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ public enum DockerBase {
DEFAULT("redhat/ubi9-minimal:latest", "", "microdnf", "dockerfiles/default/Dockerfile"),

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

// Chainguard based wolfi image with latest jdk
WOLFI(
Expand All @@ -28,7 +28,7 @@ public enum DockerBase {
),
// Based on WOLFI above, with more extras. We don't set a base image because
// we programmatically extend from the wolfi image.
CLOUD_ESS(null, "-cloud-ess", "apk", "Dockerfile.ess"),
CLOUD_ESS(null, "-cloud-ess", "apk", "dockerfiles/cloud_ess/Dockerfile"),

CLOUD_ESS_FIPS(
null,
Expand All @@ -42,10 +42,6 @@ public enum DockerBase {
private final String packageManager;
private final String dockerfile;

DockerBase(String image, String suffix) {
this(image, suffix, "apt-get", "dockerfile");
}

DockerBase(String image, String suffix, String packageManager, String dockerfile) {
this.image = image;
this.suffix = suffix;
Expand Down
2 changes: 1 addition & 1 deletion distribution/docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ custom behaviour in the

We go to some lengths to try and make the Docker build resilient to transient
network errors. This is why, when browsing the
[Dockerfile](src/docker/Dockerfile), you'll see many commands wrapped in looping
[Dockerfile](src/docker/dockerfiles/cloud_ess/Dockerfile), you'll see many commands wrapped in looping
logic, so that if e.g. package installation fails, we try again. We also perform
explicit `docker pull` commands instead of relying on `docker run` to pull an
image down automatically, so that we can wrap the `pull` part in a retry.
Expand Down
5 changes: 2 additions & 3 deletions distribution/docker/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ void addBuildDockerContextTask(Architecture architecture, DockerBase base, Strin

void addTransformDockerContextTask(Architecture architecture, DockerBase base) {
def transformTask = tasks.register(taskName("transform", architecture, base, "DockerContext"), Sync) {
TaskProvider<Tar> buildContextTask = tasks.named(taskName("build", architecture, base, "DockerContext"))
TaskProvider<Tar> buildContextTask = tasks.named(taskName("build", architecture, base, "DockerContext"))
dependsOn(buildContextTask)

String arch = architecture == Architecture.AARCH64 ? '-aarch64' : ''
Expand Down Expand Up @@ -532,7 +532,7 @@ void addBuildCloudDockerImageTasks(Architecture architecture) {
rename ~/((?:file|metric)beat)-.*\.tar\.gz$/, "\$1-${VersionProperties.elasticsearch}.tar.gz"

String baseSuffix = DockerBase.WOLFI.suffix
from(projectDir.resolve("src/docker/Dockerfile.ess")) {
from(projectDir.resolve("src/docker/${dockerBase.dockerfile}")) {
expand(
[
base_image : "elasticsearch${baseSuffix}:${architecture.classifier}",
Expand All @@ -542,7 +542,6 @@ void addBuildCloudDockerImageTasks(Architecture architecture) {
]
)
filter SquashNewlinesFilter
rename ~/Dockerfile\.ess$/, 'Dockerfile'
}
}

Expand Down
271 changes: 0 additions & 271 deletions distribution/docker/src/docker/Dockerfile

This file was deleted.

Loading