Skip to content
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

Prepare home directories for docker images in a different stage #20356

Merged
merged 1 commit into from
Aug 3, 2020

Conversation

jsoriano
Copy link
Member

@jsoriano jsoriano commented Jul 30, 2020

Files included in the home directory of the docker images need some
changes on permissions and ownership after being copied. If this is
done as a COPY and a RUN, it creates two layers with all the files, that
are included in the final image, increasing its size.

Move the preparation of the home directory to a different stage, so in
the final image it is done as an only COPY operation.

This change reduces for example the Metricbeat image size a ~25%,
from 558MB to 418MB. Auditbeat image from 462MB to 370MB.

How to test

  • Docker images continue working.

Files included in the home directory of the docker images need some
changes on permissions and ownerships after being copied. If this is
done as a COPY and a RUN, it creates two layers with all the files, that
are included in the final image, increasing its size.

Move the preparation of the home directory to a different stage, so in
the final image it is done as an only COPY operation.
@jsoriano jsoriano added :Packaging review needs_backport PR is waiting to be backported to other branches. [zube]: In Review test-plan Add this PR to be manual test plan Team:Automation Label for the Observability productivity team v7.10.0 labels Jul 30, 2020
@jsoriano jsoriano self-assigned this Jul 30, 2020
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels Jul 30, 2020
@jsoriano
Copy link
Member Author

/packaging

@jsoriano
Copy link
Member Author

run beats-ci/packaging

@v1v
Copy link
Member

v1v commented Jul 30, 2020

/package

@kuisathaverat
Copy link
Contributor

/packaging

@elasticmachine
Copy link
Collaborator

💔 Tests Failed

Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: [Pull request #20356 opened]

  • Start Time: 2020-07-30T14:46:25.864+0000

  • Duration: 111 min 43 sec

Test stats 🧪

Test Results
Failed 1
Passed 17694
Skipped 1916
Total 19611

Test errors

Expand to view the tests failures

  • Name: Build and Test / Libbeat / Libbeat oss / TestDockerStart – docker

    • Age: 1
    • Duration: 12.59
    • Error Details: Failed

Steps errors

Expand to view the steps failures

  • Name: Mage build test

    • Description: mage build test

    • Duration: 22 min 44 sec

    • Start Time: 2020-07-30T15:12:26.365+0000

    • log

  • Name: Install Go 1.14.4

    • Description: .ci/scripts/install-go.sh

    • Duration: 1 min 33 sec

    • Start Time: 2020-07-30T15:12:16.363+0000

    • log

Log output

Expand to view the last 100 lines of log output

[2020-07-30T16:36:13.335Z]  OS/Arch:           darwin/amd64
[2020-07-30T16:36:13.335Z]  Experimental:      false
[2020-07-30T16:36:13.335Z] Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?
[2020-07-30T16:36:13.335Z] It requires Docker daemon to be installed and running
[2020-07-30T16:36:34.735Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats
[2020-07-30T16:36:35.090Z] + find . -type f -name TEST*.xml -path */build/* -delete
[2020-07-30T16:36:35.122Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Lint
[2020-07-30T16:36:35.321Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Elastic-Agent-x-pack
[2020-07-30T16:36:35.511Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Winlogbeat-oss
[2020-07-30T16:36:35.689Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Journalbeat-oss
[2020-07-30T16:36:35.865Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Dockerlogbeat
[2020-07-30T16:36:36.042Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Auditbeat-crosscompile
[2020-07-30T16:36:36.221Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Functionbeat-x-pack
[2020-07-30T16:36:36.397Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Generators-Metricbeat-Linux
[2020-07-30T16:36:36.582Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Elastic-Agent-x-pack-Windows
[2020-07-30T16:36:36.774Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Packetbeat-Linux
[2020-07-30T16:36:36.951Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-OSS-Unit-tests
[2020-07-30T16:36:37.146Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Auditbeat-oss-Windows
[2020-07-30T16:36:37.332Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Heartbeat-oss
[2020-07-30T16:36:37.504Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Auditbeat-x-pack-Windows
[2020-07-30T16:36:37.678Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Auditbeat-x-pack
[2020-07-30T16:36:37.849Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Auditbeat-oss-Linux
[2020-07-30T16:36:38.021Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Winlogbeat-Windows-x-pack
[2020-07-30T16:36:38.204Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Libbeat-x-pack
[2020-07-30T16:36:38.385Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Filebeat-x-pack-Windows
[2020-07-30T16:36:38.564Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Filebeat-Windows
[2020-07-30T16:36:38.753Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-crosscompile
[2020-07-30T16:36:38.932Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Winlogbeat-Windows
[2020-07-30T16:36:39.106Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-Windows
[2020-07-30T16:36:39.292Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack-Windows
[2020-07-30T16:36:39.469Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Generators-Beat-Linux
[2020-07-30T16:36:39.645Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Libbeat-oss
[2020-07-30T16:36:39.824Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Elastic-Agent-Mac-OS-X
[2020-07-30T16:36:40.001Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Filebeat-x-pack
[2020-07-30T16:36:40.193Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Filebeat-oss
[2020-07-30T16:36:40.380Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Auditbeat-oss-Mac-OS-X
[2020-07-30T16:36:40.556Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Filebeat-x-pack-Mac-OS-X
[2020-07-30T16:36:40.736Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Filebeat-Mac-OS-X
[2020-07-30T16:36:40.916Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Auditbeat-x-pack-Mac-OS-X
[2020-07-30T16:36:41.092Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests
[2020-07-30T16:36:41.274Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-Mac-OS-X
[2020-07-30T16:36:41.457Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack-Mac-OS-X
[2020-07-30T16:36:41.642Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-OSS-Python-Integration-tests
[2020-07-30T16:36:41.824Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Functionbeat-Mac-OS-X-x-pack
[2020-07-30T16:36:42.010Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Heartbeat-Mac-OS-X
[2020-07-30T16:36:42.181Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Packetbeat-Mac-OS-X
[2020-07-30T16:36:42.381Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Functionbeat-Windows
[2020-07-30T16:36:42.562Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack
[2020-07-30T16:36:42.744Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Heartbeat-Windows
[2020-07-30T16:36:42.933Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Packetbeat-Windows
[2020-07-30T16:36:43.118Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Generators-Metricbeat-Mac-OS-X
[2020-07-30T16:36:43.306Z] Running in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Generators-Beat-Mac-OS-X
[2020-07-30T16:36:43.778Z] + cat
[2020-07-30T16:36:43.778Z] + /usr/local/bin/runbld ./runbld-script
[2020-07-30T16:36:43.778Z] Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF8
[2020-07-30T16:36:51.960Z] runbld>>> runbld started
[2020-07-30T16:36:51.960Z] runbld>>> 1.6.12/f45d832f2ba0aa2722ab4ec1fda8ad140f027f8b
[2020-07-30T16:36:53.356Z] runbld>>> The following profiles matched the job 'Beats/beats/PR-20356' in order of occurrence in the config (last value wins).
[2020-07-30T16:36:54.746Z] runbld>>> Debug logging enabled.
[2020-07-30T16:36:54.746Z] runbld>>> Storing result
[2020-07-30T16:36:54.746Z] runbld>>> Store result: created {:total 2, :successful 2, :failed 0} 1
[2020-07-30T16:36:54.746Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200730163654-5373855C
[2020-07-30T16:36:54.746Z] runbld>>> Adding system facts.
[2020-07-30T16:36:55.693Z] runbld>>> Adding vcs info for the latest commit:  2775eaec3c8c3858cb95fb03d1246f8532689673
[2020-07-30T16:36:55.693Z] runbld>>> >>>>>>>>>>>> SCRIPT EXECUTION BEGIN >>>>>>>>>>>>
[2020-07-30T16:36:55.693Z] runbld>>> Adding /usr/lib/jvm/java-8-openjdk-amd64/bin to the path.
[2020-07-30T16:36:55.955Z] Processing JUnit reports with runbld...
[2020-07-30T16:36:55.955Z] + echo 'Processing JUnit reports with runbld...'
[2020-07-30T16:36:56.218Z] runbld>>> <<<<<<<<<<<< SCRIPT EXECUTION END <<<<<<<<<<<<
[2020-07-30T16:36:56.218Z] runbld>>> DURATION: 52ms
[2020-07-30T16:36:56.218Z] runbld>>> STDOUT: 40 bytes
[2020-07-30T16:36:56.218Z] runbld>>> STDERR: 49 bytes
[2020-07-30T16:36:56.218Z] runbld>>> WRAPPED PROCESS: SUCCESS (0)
[2020-07-30T16:36:56.218Z] runbld>>> Searching for build metadata in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats
[2020-07-30T16:36:57.613Z] runbld>>> Storing build metadata: 
[2020-07-30T16:36:57.613Z] runbld>>> Adding test report.
[2020-07-30T16:36:57.613Z] runbld>>> Searching for junit test output files with the pattern: TEST-.*\.xml$ in: /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats
[2020-07-30T16:36:58.188Z] runbld>>> Found 136 test output files
[2020-07-30T16:36:59.155Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-openmetrics.xml
[2020-07-30T16:36:59.155Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-iis.xml
[2020-07-30T16:36:59.470Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-istio.xml
[2020-07-30T16:36:59.470Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-tomcat.xml
[2020-07-30T16:36:59.470Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-x-pack/x-pack/metricbeat/build/TEST-go-integration-activemq.xml
[2020-07-30T16:36:59.470Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-graphite.xml
[2020-07-30T16:36:59.470Z] runbld>>> No testsuite node found in /var/lib/jenkins/workspace/Beats_beats_PR-20356/src/github.com/elastic/beats/Metricbeat-OSS-Go-Integration-tests/metricbeat/build/TEST-go-integration-windows.xml
[2020-07-30T16:37:02.029Z] runbld>>> Test output logs contained: Errors: 0 Failures: 1 Tests: 19461 Skipped: 1646
[2020-07-30T16:37:02.029Z] runbld>>> Storing result
[2020-07-30T16:37:02.029Z] runbld>>> FAILURES: 1
[2020-07-30T16:37:02.029Z] runbld>>> Store result: updated {:total 2, :successful 2, :failed 0} 2
[2020-07-30T16:37:02.029Z] runbld>>> BUILD: https://c150076387b5421f9154dfbf536e5c60.us-west1.gcp.cloud.es.io:9243/build-1587637540455/t/20200730163654-5373855C
[2020-07-30T16:37:02.292Z] runbld>>> Email notification disabled by environment variable.
[2020-07-30T16:37:02.292Z] runbld>>> Slack notification disabled by environment variable.
[2020-07-30T16:37:07.969Z] Running on Jenkins in /var/lib/jenkins/workspace/Beats_beats_PR-20356
[2020-07-30T16:37:08.184Z] [INFO] getVaultSecret: Getting secrets
[2020-07-30T16:37:08.283Z] Masking supported pattern matches of $VAULT_ADDR or $VAULT_ROLE_ID or $VAULT_SECRET_ID
[2020-07-30T16:37:09.442Z] + chmod 755 generate-build-data.sh
[2020-07-30T16:37:09.442Z] + ./generate-build-data.sh https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20356/ https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20356/runs/1 FAILURE 6643303
[2020-07-30T16:37:09.442Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20356/runs/1/steps/?limit=10000 -o steps-info.json
[2020-07-30T16:37:11.926Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20356/runs/1/tests/?status=FAILED -o tests-errors.json
[2020-07-30T16:37:11.926Z] INFO: curl https://beats-ci.elastic.co/blue/rest/organizations/jenkins/pipelines/Beats/beats/PR-20356/runs/1/log/ -o pipeline-log.txt

@jsoriano jsoriano merged commit aaf3d7e into elastic:master Aug 3, 2020
@jsoriano jsoriano deleted the reduce-docker-image branch August 3, 2020 11:31
@jsoriano jsoriano removed the needs_backport PR is waiting to be backported to other branches. label Aug 3, 2020
jsoriano added a commit to jsoriano/beats that referenced this pull request Aug 3, 2020
…tic#20356)

Files included in the home directory of the docker images need some
changes on permissions and ownerships after being copied. If this is
done as a COPY and a RUN, it creates two layers with all the files, that
are included in the final image, increasing its size.

Move the preparation of the home directory to a different stage, so in
the final image it is done as an only COPY operation.

(cherry picked from commit aaf3d7e)
jsoriano added a commit that referenced this pull request Aug 3, 2020
…) (#20399)

Files included in the home directory of the docker images need some
changes on permissions and ownerships after being copied. If this is
done as a COPY and a RUN, it creates two layers with all the files, that
are included in the final image, increasing its size.

Move the preparation of the home directory to a different stage, so in
the final image it is done as an only COPY operation.

(cherry picked from commit aaf3d7e)
v1v added a commit to v1v/beats that referenced this pull request Aug 6, 2020
…ne-2.0

* upstream/master:
  [docs] Promote ingest management to beta (elastic#20295)
  Upgrade elasticsearch client library used in tests (elastic#20405)
  Disable logging when pulling on python integration tests (elastic#20397)
  Remove pillow from testing requirements.txt (elastic#20407)
  [Filebeat][ATP Module]Setting user agent field required by the API (elastic#20440)
  [Ingest Manager] Send datastreams fields (elastic#20402)
  Add event.ingested to all Filebeat modules (elastic#20386)
  [Elastic Agent] Fix agent control socket path to always be less than 107 characters (elastic#20426)
  Improve cgroup_regex docs with examples (elastic#20425)
  Makes `metrics` config option required in app_insights (elastic#20406)
  Ensure install scripts only install if needed (elastic#20349)
  Update container name for the azure filesets (elastic#19899)
  Group same timestamp metrics values in app_insights metricset (elastic#20403)
  add_process_metadata processor adds container id even if process metadata not accessible (elastic#19767)
  Support "cluster" scope in Metricbeat elasticsearch module (elastic#18547)
  [Filebeat][SophosXG Module] Renaming module and fileset (elastic#20396)
  Update Suricata dashboards (elastic#20394)
  [Elastic Agent] Improve version, restart, enroll CLI commands (elastic#20359)
  Prepare home directories for docker images in a different stage (elastic#20356)
v1v added a commit to v1v/beats that referenced this pull request Aug 6, 2020
…allation

* upstream/master: (23 commits)
  [docs] Promote ingest management to beta (elastic#20295)
  Upgrade elasticsearch client library used in tests (elastic#20405)
  Disable logging when pulling on python integration tests (elastic#20397)
  Remove pillow from testing requirements.txt (elastic#20407)
  [Filebeat][ATP Module]Setting user agent field required by the API (elastic#20440)
  [Ingest Manager] Send datastreams fields (elastic#20402)
  Add event.ingested to all Filebeat modules (elastic#20386)
  [Elastic Agent] Fix agent control socket path to always be less than 107 characters (elastic#20426)
  Improve cgroup_regex docs with examples (elastic#20425)
  Makes `metrics` config option required in app_insights (elastic#20406)
  Ensure install scripts only install if needed (elastic#20349)
  Update container name for the azure filesets (elastic#19899)
  Group same timestamp metrics values in app_insights metricset (elastic#20403)
  add_process_metadata processor adds container id even if process metadata not accessible (elastic#19767)
  Support "cluster" scope in Metricbeat elasticsearch module (elastic#18547)
  [Filebeat][SophosXG Module] Renaming module and fileset (elastic#20396)
  Update Suricata dashboards (elastic#20394)
  [Elastic Agent] Improve version, restart, enroll CLI commands (elastic#20359)
  Prepare home directories for docker images in a different stage (elastic#20356)
  New multiline mode in Filebeat: while_pattern (elastic#19662)
  ...
jsoriano added a commit that referenced this pull request Aug 24, 2020
Add an additional docker build that builds images based on Red Hat UBI, following
Red Hat requirements for certified images.
Additional checks have been added to packaging tests for labels and licenses.
Additional changes done to support it also in Elastic Agent images:
* Home directory is prepared in a different stage (#20356).
* Allow the docker image to be run with random user ids (#18873).
* Explicitly select a Dockerfile and entry point template.
* Add NOTICE.txt file to all agent packages.
* Actually run package tests after building packages, added flag to allow root user.
* Improved checks on required packages, so they are not re-built if they already are.
jsoriano added a commit to jsoriano/beats that referenced this pull request Aug 24, 2020
Add an additional docker build that builds images based on Red Hat UBI, following
Red Hat requirements for certified images.
Additional checks have been added to packaging tests for labels and licenses.
Additional changes done to support it also in Elastic Agent images:
* Home directory is prepared in a different stage (elastic#20356).
* Allow the docker image to be run with random user ids (elastic#18873).
* Explicitly select a Dockerfile and entry point template.
* Add NOTICE.txt file to all agent packages.
* Actually run package tests after building packages, added flag to allow root user.
* Improved checks on required packages, so they are not re-built if they already are.

(cherry picked from commit e31794d)
jsoriano added a commit that referenced this pull request Aug 24, 2020
Add an additional docker build that builds images based on Red Hat UBI, following
Red Hat requirements for certified images.
Additional checks have been added to packaging tests for labels and licenses.
Additional changes done to support it also in Elastic Agent images:
* Home directory is prepared in a different stage (#20356).
* Allow the docker image to be run with random user ids (#18873).
* Explicitly select a Dockerfile and entry point template.
* Add NOTICE.txt file to all agent packages.
* Actually run package tests after building packages, added flag to allow root user.
* Improved checks on required packages, so they are not re-built if they already are.

(cherry picked from commit e31794d)
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
…tic#20356)

Files included in the home directory of the docker images need some
changes on permissions and ownerships after being copied. If this is
done as a COPY and a RUN, it creates two layers with all the files, that
are included in the final image, increasing its size.

Move the preparation of the home directory to a different stage, so in
the final image it is done as an only COPY operation.
melchiormoulin pushed a commit to melchiormoulin/beats that referenced this pull request Oct 14, 2020
Add an additional docker build that builds images based on Red Hat UBI, following
Red Hat requirements for certified images.
Additional checks have been added to packaging tests for labels and licenses.
Additional changes done to support it also in Elastic Agent images:
* Home directory is prepared in a different stage (elastic#20356).
* Allow the docker image to be run with random user ids (elastic#18873).
* Explicitly select a Dockerfile and entry point template.
* Add NOTICE.txt file to all agent packages.
* Actually run package tests after building packages, added flag to allow root user.
* Improved checks on required packages, so they are not re-built if they already are.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Packaging review Team:Automation Label for the Observability productivity team test-plan Add this PR to be manual test plan v7.10.0 [zube]: In Review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants