-
Notifications
You must be signed in to change notification settings - Fork 25.2k
Address review feedback on es default docker image #126330
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
Conversation
Pinging @elastic/es-delivery (Team:Delivery) |
9a974b8
to
60b0be6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I really like having Dockerfile.default
as a separate definition. It makes it much easier to understand.
I have a few questions with possible improvements.
DockerBase(String image, String suffix) { | ||
this(image, suffix, "apt-get"); | ||
this(image, suffix, "apt-get", "dockerfile"); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't found any usage of this constructor. Is it possible to remove it?
distribution/docker/build.gradle
Outdated
from(projectDir.resolve("src/docker/${base.dockerfile}")) { | ||
expand(varExpansions) | ||
filter SquashNewlinesFilter | ||
rename ~/Dockerfile\..+$/, 'Dockerfile' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I understand that these files should by convention be named Dockerfile.*
. However, there are no limitations in what will be set as DockerBase.dockerfile
, so maybe it would be safer to do rename like this?
rename base.dockerfile, 'Dockerfile`
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
if (details.name.equals("Dockerfile")) { | ||
filter { String contents -> | ||
return contents.replaceAll('^RUN *.*artifacts-no-kpi.*$', "COPY $distributionFolderName .") | ||
.replaceAll('^RUN tar -zxf /tmp/elasticsearch.tar.gz --strip-components=1 &&', "RUN ") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we avoid this second replaceAll
by changing the Dockerfile.default
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure. it would come with the cost of another docker operatino. What we avoid when using a local distro is the unpackaging bit. not sure how to change the docker file to make this efficient to cover both scenarios
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I've missed the point here. I can see now that these two replaceAll
operations are related.
What I still don't get is what is the condition (and where it is) which decides if this transformation for Dockerfile will be executed.
Could you please point me to it?
This addresses feedback we got for our default image at docker-library/official-images#18692 This also introduces separate docker source files to make maintaining those easier.
required for testing for now
This addresses feedback we got for our default image at docker-library/official-images#18692 This also introduces separate docker source files to make maintaining those easier. We cannot take over all suggested changes as we require certain settings to have our packaging tests pass as expected.
💔 Backport failed
You can use sqren/backport to manually backport by running |
This addresses feedback we got for our default image at docker-library/official-images#18692 This also introduces separate docker source files to make maintaining those easier. We cannot take over all suggested changes as we require certain settings to have our packaging tests pass as expected.
💚 All backports created successfully
Questions ?Please refer to the Backport tool documentation |
This addresses feedback we got for our default image at docker-library/official-images#18692 This also introduces separate docker source files to make maintaining those easier. We cannot take over all suggested changes as we require certain settings to have our packaging tests pass as expected. (cherry picked from commit ca19573) # Conflicts: # build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java # distribution/docker/src/docker/Dockerfile
* Address review feedback on es default docker image (#126330) This addresses feedback we got for our default image at docker-library/official-images#18692 This also introduces separate docker source files to make maintaining those easier. We cannot take over all suggested changes as we require certain settings to have our packaging tests pass as expected. (cherry picked from commit ca19573) # Conflicts: # build-tools-internal/src/main/java/org/elasticsearch/gradle/internal/DockerBase.java # distribution/docker/src/docker/Dockerfile * Adjust docker fips entrypoint and cmd (#127630) Also extract docker fips configuration in explicit docker file * Fix merge issue
This addresses feedback we got for our default image at docker-library/official-images#18692
This also introduces separate docker source files to make maintaining those easier.