-
Notifications
You must be signed in to change notification settings - Fork 5k
Build cloud docker images for elastic-agent #28134
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
Merged
v1v
merged 21 commits into
elastic:master
from
v1v:feature/support-cloud-specific-docker-images
Oct 6, 2021
Merged
Changes from 7 commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
472a660
Support cloud variant
v1v a0dec42
[ci] build cloud variant
v1v f902af5
Add folder
v1v 14c5499
Apply suggestions from code review
v1v 093a855
Usean extra spec similar to the ubi8 variant
v1v 34dfc14
Merge branch 'feature/support-cloud-specific-docker-images' of github…
v1v 3c6520d
Revmove empty line
v1v 0fe8ad0
Use the right variable
v1v f160c7e
Apply suggestions from code review
v1v 6b8e09d
Apply suggestions from code review
v1v f2bab33
Apply suggestions from code review
v1v 8167e47
Merge branch 'feature/support-cloud-specific-docker-images' of github…
v1v 304ed83
See https://github.com/elastic/elasticsearch/pull/74980/files\#diff-6…
v1v 636c46a
Add entrypoint for cloud
v1v 5c2c93e
Create folder, grant permissions and use the tini location
v1v 203c429
Fix entrypoint
v1v 98ebbc8
Support spec for cloud only
v1v de602d3
Support a root user
v1v 1737576
Avoid negative condition
v1v eb2cc55
Merge branch 'master' into feature/support-cloud-specific-docker-images
v1v 2d8119d
Use the right location folder
v1v File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -22,6 +22,10 @@ RUN mkdir -p {{ $beatHome }}/data {{ $beatHome }}/data/elastic-agent-{{ commit_s | |
| {{- end }} | ||
| {{- range $i, $modulesd := .ModulesDirs }} | ||
| chmod 0775 {{ $beatHome}}/{{ $modulesd }} && \ | ||
| {{- end }} | ||
| {{- if contains .from "-cloud" }} | ||
| tar -xvf {{ $beatHome }}/data/elastic-agent-*/downloads/metricbeat-*.tar.gz --strip-components 1 --directory /opt --wildcards "*metricbeat" && \ | ||
| tar -xvf {{ $beatHome }}/data/elastic-agent-*/downloads/filebeat-*.tar.gz --strip-components 1 --directory /opt --wildcards "*filebeat" && \ | ||
| {{- end }} | ||
| true | ||
|
|
||
|
|
@@ -41,7 +45,6 @@ RUN case $(arch) in aarch64) YUM_FLAGS="-x bind-license";; esac; \ | |
| yum install -y epel-release && \ | ||
| yum update -y $YUM_FLAGS && \ | ||
| yum install -y jq && \ | ||
|
|
||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Unrelated to this particular change, but let's keep it tidy |
||
| yum clean all && \ | ||
| exit_code=0 && break || exit_code=$? && echo "yum error: retry $iter in 10s" && sleep 10; \ | ||
| done; \ | ||
|
|
@@ -134,6 +137,11 @@ RUN mkdir /licenses | |
| COPY --from=home {{ $beatHome }}/LICENSE.txt /licenses | ||
| COPY --from=home {{ $beatHome }}/NOTICE.txt /licenses | ||
|
|
||
| {{- if contains .from "-cloud" }} | ||
| COPY --from=home /opt/filebeat /opt/filebeat | ||
| COPY --from=home /opt/metricbeat /opt/metricbeat | ||
| {{- end }} | ||
|
|
||
| {{- if ne .user "root" }} | ||
| RUN groupadd --gid 1000 {{ .BeatName }} | ||
| RUN useradd -M --uid 1000 --gid 1000 --groups 0 --home {{ $beatHome }} {{ .user }} | ||
|
|
||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.