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

[8.16](backport #6393) Switch back to Ubuntu 20.04-based Docker images in the cloud #6445

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

mergify[bot]
Copy link
Contributor

@mergify mergify bot commented Dec 27, 2024

According to the support matrix, ECE versions up to 3.6 are marked as compatible with Docker 19.03 and the Wolfi images require Docker version of 20.10.10.

Also, we need Ubuntu version 20.04 for glibc compatibility.

To test locally run:

DOCKER_VARIANTS="cloud" PACKAGES=docker mage package

Before the change

Size

docker.elastic.co/beats-ci/elastic-agent-cloud 8.17.1 caedc46a4c4c 1.18GB
Inspect
[
    {
        "Id": "sha256:caedc46a4c4c4fb87bc0a607c3b8166f67b32c81208079e2858102d16a92c84f",
        "RepoTags": [
            "docker.elastic.co/beats-ci/elastic-agent-cloud:8.17.1"
        ],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-12-19T09:49:38.718757634Z",
        "DockerVersion": "",
        "Author": "github.com/chainguard-dev/apko",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "elastic-agent",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/share/elastic-agent:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "SSL_CERT_FILE=/etc/ssl/certs/ca-certificates.crt",
                "BEAT_SETUID_AS=elastic-agent",
                "ELASTIC_CONTAINER=true",
                "GODEBUG=madvdontneed=1",
                "LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVERRIDE=/"
            ],
            "Cmd": [
                "/app/apm.sh"
            ],
            "ArgsEscaped": true,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/usr/share/elastic-agent",
            "Entrypoint": [
                "/usr/bin/tini",
                "--"
            ],
            "OnBuild": null,
            "Labels": {
                "description": "Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.",
                "io.k8s.description": "Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.",
                "io.k8s.display-name": "Elastic-Agent image",
                "license": "Elastic License",
                "name": "elastic-agent",
                "org.label-schema.build-date": "2024-12-19T09:47:20Z",
                "org.label-schema.license": "Elastic License",
                "org.label-schema.name": "elastic-agent",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.url": "https://www.elastic.co/beats/elastic-agent",
                "org.label-schema.vcs-ref": "3d3c55725a0c94909f64e7cfdf7b1a1d77f7c811",
                "org.label-schema.vcs-url": "github.com/elastic/elastic-agent",
                "org.label-schema.vendor": "Elastic",
                "org.label-schema.version": "8.17.1",
                "org.opencontainers.image.authors": "infra@elastic.co",
                "org.opencontainers.image.created": "2024-12-19T09:47:20Z",
                "org.opencontainers.image.licenses": "Elastic License",
                "org.opencontainers.image.source": "https://github.com/chainguard-images/images/tree/main/images/wolfi-base",
                "org.opencontainers.image.title": "Elastic-Agent",
                "org.opencontainers.image.url": "https://images.chainguard.dev/directory/image/wolfi-base/overview",
                "org.opencontainers.image.vendor": "Elastic",
                "release": "1",
                "summary": "elastic-agent",
                "url": "https://www.elastic.co/beats/elastic-agent",
                "vendor": "Elastic",
                "version": "8.17.1"
            }
        },
        "Architecture": "arm64",
        "Os": "linux",
        "Size": 1175377167,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/li26oqc4s1pg04h8y9zwdd411/diff:/var/lib/docker/overlay2/l2joqfz3uck1tynj7kbk5nyke/diff:/var/lib/docker/overlay2/kmggkriysxblyr7qml5l50k9z/diff:/var/lib/docker/overlay2/q3qiyyyyuxsvy5ysnrxadakem/diff:/var/lib/docker/overlay2/fejjkoj7f7rk0yic5ml7vea6f/diff:/var/lib/docker/overlay2/q0l4iee5pgtfdz0tjs76ex1sb/diff:/var/lib/docker/overlay2/mjkxg8x0ncnw6qus6pg0hl8fz/diff:/var/lib/docker/overlay2/1dxc3sh1x2wpoee4410dvvftf/diff:/var/lib/docker/overlay2/2hu6boq55yz57vittvxe13hhr/diff:/var/lib/docker/overlay2/1oy8phqq1s1zjg6xvrjf1r6c8/diff:/var/lib/docker/overlay2/89wll2a8oy7050mmn91fadgid/diff:/var/lib/docker/overlay2/t7e73fp29a806hjes9x8wnpvv/diff:/var/lib/docker/overlay2/19d1789725c2bd0f98f49a62b0741133b362cbb5922d94e0205ed66fc2b0048c/diff",
                "MergedDir": "/var/lib/docker/overlay2/wv83p9wqp3ezb9ic92mu38m7l/merged",
                "UpperDir": "/var/lib/docker/overlay2/wv83p9wqp3ezb9ic92mu38m7l/diff",
                "WorkDir": "/var/lib/docker/overlay2/wv83p9wqp3ezb9ic92mu38m7l/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:f43404bb77009eea1482839f0cf091b83c81f150204978d4851b13328404b4f3",
                "sha256:59ed68e1d6db7b0ba2acedbfa8853fdfb1e5c67c5f91fc2acdfe1a9dd0f64af0",
                "sha256:c50feb446c4f304fdb070109eea934354f345596d4f136b494689b301c90ae7e",
                "sha256:1e22e0003ccce65177d573e172c0aaf155a6451547d18f165fa33a9d80c097b7",
                "sha256:c2f52749069de39e04570c64234578f3a17bf365126a20417dda8883fd2dba72",
                "sha256:c9edd4918dc9a860c9439b3d74b268940f2d4a07b488b1cc236c4828b5d3badf",
                "sha256:68cb2fad09b718dc315269f3095ba398efe391e6204e481f9a769755bf7cd7be",
                "sha256:2118c2d15c648b2fd68813084254f8755a0dcedf186d8129e8b31babbbbce890",
                "sha256:d5a5750622b53bd6d9372d92c2613bf62f6244a51a580f47f3e210037ab00e57",
                "sha256:e854afcfea4d935d8a940091409cb27c5b99b10961284b9d6ed13e0e6155cfad",
                "sha256:a5edb3b88dfd7d34a920360134ab1fdf980c1f376f1d3808e2a8b493b3de1ce4",
                "sha256:55bd7770f640fca339099e7d0875cf2a8612795a9fb5c09c534bedc42e35c7cb",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:14fe76772e0971d85e4c762b03f7b1d184c3d58787c7eb9cada114568eb36c7b"
            ]
        },
        "Metadata": {
            "LastTagTime": "2024-12-19T09:49:39.686916301Z"
        }
    }
]
History
IMAGE          CREATED         CREATED BY                                      SIZE      COMMENT
caedc46a4c4c   2 minutes ago   RUN /bin/sh -c echo -e '#!/bin/sh\nexec /usr…   48B       buildkit.dockerfile.v0
<missing>      2 minutes ago   CMD ["/app/apm.sh"]                             0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENTRYPOINT ["/usr/bin/tini" "--"]               0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   WORKDIR /usr/share/elastic-agent                0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVE…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   USER elastic-agent                              0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c mkdir /app &&     chown elast…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY /opt /opt # buildkit                       392MB     buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY /usr/share/elastic-agent/NOTICE.txt /li…   5.39MB    buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY /usr/share/elastic-agent/LICENSE.txt /l…   3.86kB    buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c mkdir /licenses # buildkit       0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c chmod 0777 /usr/share/elastic…   101kB     buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY --chown=elastic-agent:elastic-agent /us…   716MB     buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c groupadd --gid 1000 elastic-a…   4.18kB    buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY docker-entrypoint /usr/local/bin/docker…   509B      buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c set -e ;   TINI_BIN="";   TIN…   23.9kB    buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV GODEBUG=madvdontneed=1                      0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV PATH=/usr/share/elastic-agent:/usr/local…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV ELASTIC_CONTAINER=true                      0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   LABEL org.label-schema.build-date=2024-12-19…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c for iter in {1..10}; do      …   48.8MB    buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV BEAT_SETUID_AS=elastic-agent                0B        buildkit.dockerfile.v0
<missing>      6 weeks ago     apko                                            13.6MB    This is an apko single-layer image

After the change

Size

docker.elastic.co/beats-ci/elastic-agent-cloud 8.17.1 71949f89eb4c 1.23GB
Inspect
[
    {
        "Id": "sha256:71949f89eb4ca60719f393cd873271ee6cbb5a965a8fec53f7838bd53a65aa56",
        "RepoTags": [
            "docker.elastic.co/beats-ci/elastic-agent-cloud:8.17.1"
        ],
        "RepoDigests": [],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-12-19T09:42:34.560975132Z",
        "DockerVersion": "",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "elastic-agent",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/usr/share/elastic-agent:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "BEAT_SETUID_AS=elastic-agent",
                "ELASTIC_CONTAINER=true",
                "GODEBUG=madvdontneed=1",
                "LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVERRIDE=/"
            ],
            "Cmd": [
                "/app/apm.sh"
            ],
            "ArgsEscaped": true,
            "Image": "",
            "Volumes": null,
            "WorkingDir": "/usr/share/elastic-agent",
            "Entrypoint": [
                "/usr/bin/tini",
                "--"
            ],
            "OnBuild": null,
            "Labels": {
                "description": "Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.",
                "io.k8s.description": "Elastic Agent - single, unified way to add monitoring for logs, metrics, and other types of data to a host.",
                "io.k8s.display-name": "Elastic-Agent image",
                "license": "Elastic License",
                "name": "elastic-agent",
                "org.label-schema.build-date": "2024-12-19T09:40:25Z",
                "org.label-schema.license": "Elastic License",
                "org.label-schema.name": "elastic-agent",
                "org.label-schema.schema-version": "1.0",
                "org.label-schema.url": "https://www.elastic.co/beats/elastic-agent",
                "org.label-schema.vcs-ref": "49a8eebd66921cbb25f82feec9f169e29242e8c5",
                "org.label-schema.vcs-url": "github.com/elastic/elastic-agent",
                "org.label-schema.vendor": "Elastic",
                "org.label-schema.version": "8.17.1",
                "org.opencontainers.image.authors": "infra@elastic.co",
                "org.opencontainers.image.created": "2024-12-19T09:40:25Z",
                "org.opencontainers.image.licenses": "Elastic License",
                "org.opencontainers.image.ref.name": "ubuntu",
                "org.opencontainers.image.title": "Elastic-Agent",
                "org.opencontainers.image.vendor": "Elastic",
                "org.opencontainers.image.version": "20.04",
                "release": "1",
                "summary": "elastic-agent",
                "url": "https://www.elastic.co/beats/elastic-agent",
                "vendor": "Elastic",
                "version": "8.17.1"
            }
        },
        "Architecture": "arm64",
        "Variant": "v8",
        "Os": "linux",
        "Size": 1232409245,
        "GraphDriver": {
            "Data": {
                "LowerDir": "/var/lib/docker/overlay2/xj0aw4yb52ocd5rb17lyy0g9a/diff:/var/lib/docker/overlay2/qb7oiqsbhu9h5nfqwwgy09xx3/diff:/var/lib/docker/overlay2/uz9qcq6hcwiln6v1nvbttrtyw/diff:/var/lib/docker/overlay2/ylhqya0ygykuyufa35djvknko/diff:/var/lib/docker/overlay2/4y8q3ytqjp9p7uh0v8a3umgnf/diff:/var/lib/docker/overlay2/2uxqtl0r7yip4pvagdoln3v9z/diff:/var/lib/docker/overlay2/cx97hjn8xsc5gwv46a4mprzoi/diff:/var/lib/docker/overlay2/iu5z11fsatb3jzd65ej4c5g0w/diff:/var/lib/docker/overlay2/qnhw7v7g21u2rbtk87yoxmxe7/diff:/var/lib/docker/overlay2/j1tuwyumc8mxwn25b1acgkvei/diff:/var/lib/docker/overlay2/c86grgr8lav8c9cz6bfkydmi2/diff:/var/lib/docker/overlay2/wnyr60s8db2xqthcxoz0300dc/diff:/var/lib/docker/overlay2/eb6aeec3199f4e161d0fbfceddb350939405ee311d3dbf1e176b1ae0fa047cff/diff",
                "MergedDir": "/var/lib/docker/overlay2/25jqa8kp3bmlts942o7fo00yp/merged",
                "UpperDir": "/var/lib/docker/overlay2/25jqa8kp3bmlts942o7fo00yp/diff",
                "WorkDir": "/var/lib/docker/overlay2/25jqa8kp3bmlts942o7fo00yp/work"
            },
            "Name": "overlay2"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:171652ecd561458ec6fcca88016f1d5552155ecaff2445a38a97f49d6b672904",
                "sha256:e945947fce8c8bc9a2154b7867c7ded55f17d5e7c1209b0ec4c743bb4a3b4ef8",
                "sha256:82f157d0333d8f16f626e94eabf29f82a9f6f91ee16dcc2ca63fe7b8ae47fcd2",
                "sha256:607a1d3d326fe170d9204e1a28b5f195b016d807b18f597e661eb6e803affb46",
                "sha256:ff534421528c043c0f0dbcfa016eef717b333d98b713eed20d76e8e1eef769e2",
                "sha256:d5f926082f0abf47751bab6a616dc7966e43fe0940b14f0146970ae11987c35d",
                "sha256:fac32a7714907370cf81af588de5f8fc3a4d3bf2ed9b9b64323dee21543f701e",
                "sha256:94c0b4bb06363b65e8f7e717e41f129f1db8d7ce467d45640bb2ecde4609a3ed",
                "sha256:d82a90adedda2eb90574f48493f0767093e20121fe0fe88697f1d359cc3cb69a",
                "sha256:b094bf78246144df25ad96c34155bf47fd61a39e50a8664fd4e1563a16518fff",
                "sha256:069111699a4fec5338e53f575964893eb2fef8d045c107c7b68087756c2b9da9",
                "sha256:d0465ba8b985afbc66f729f54899d16184ca19b54fafa855c7ae547f71575af8",
                "sha256:5f70bf18a086007016e948b04aed3b82103a36bea41755b6cddfaf10ace3c6ef",
                "sha256:2494603c23cb415bf7ad983383b05797ac8c20b6c2e344ece98de04d2b8b2933"
            ]
        },
        "Metadata": {
            "LastTagTime": "2024-12-19T09:42:35.5291933Z"
        }
    }
]
History
IMAGE          CREATED         CREATED BY                                      SIZE      COMMENT
71949f89eb4c   2 minutes ago   RUN /bin/sh -c echo -e '#!/bin/sh\nexec /usr…   51B       buildkit.dockerfile.v0
<missing>      2 minutes ago   CMD ["/app/apm.sh"]                             0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENTRYPOINT ["/usr/bin/tini" "--"]               0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   WORKDIR /usr/share/elastic-agent                0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV LIBBEAT_MONITORING_CGROUPS_HIERARCHY_OVE…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   USER elastic-agent                              0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c mkdir /app &&     chown elast…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY /opt /opt # buildkit                       392MB     buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY /usr/share/elastic-agent/NOTICE.txt /li…   5.39MB    buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY /usr/share/elastic-agent/LICENSE.txt /l…   3.86kB    buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c mkdir /licenses # buildkit       0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c chmod 0777 /usr/share/elastic…   102kB     buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY --chown=elastic-agent:elastic-agent /us…   716MB     buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c groupadd --gid 1000 elastic-a…   334kB     buildkit.dockerfile.v0
<missing>      2 minutes ago   COPY docker-entrypoint /usr/local/bin/docker…   509B      buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c set -e ;   TINI_BIN="";   TIN…   23.9kB    buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV GODEBUG=madvdontneed=1                      0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV PATH=/usr/share/elastic-agent:/usr/local…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV ELASTIC_CONTAINER=true                      0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   LABEL org.label-schema.build-date=2024-12-19…   0B        buildkit.dockerfile.v0
<missing>      2 minutes ago   RUN /bin/sh -c for iter in {1..10}; do      …   53.4MB    buildkit.dockerfile.v0
<missing>      2 minutes ago   ENV BEAT_SETUID_AS=elastic-agent                0B        buildkit.dockerfile.v0
<missing>      2 months ago    /bin/sh -c #(nop)  CMD ["/bin/bash"]            0B        
<missing>      2 months ago    /bin/sh -c #(nop) ADD file:8537b4db344382b39…   65.7MB    
<missing>      2 months ago    /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B        
<missing>      2 months ago    /bin/sh -c #(nop)  LABEL org.opencontainers.…   0B        
<missing>      2 months ago    /bin/sh -c #(nop)  ARG LAUNCHPAD_BUILD_ARCH     0B        
<missing>      2 months ago    /bin/sh -c #(nop)  ARG RELEASE                  0B              

This is an automatic backport of pull request #6393 done by [Mergify](https://mergify.com).

* Switch back to Ubuntu 20.04-based Docker images in the cloud

According to the support matrix, ECE versions up to 3.6 are marked as
compatible with Docker 19.03 and the Wolfi images require Docker
version of 20.10.10.

Also, we need Ubuntu version 20.04 for glibc compatibility.

* Add changelog entry

(cherry picked from commit cab3e07)
@mergify mergify bot requested a review from a team as a code owner December 27, 2024 17:35
@mergify mergify bot added the backport label Dec 27, 2024
@mergify mergify bot requested review from kaanyalti and pchila and removed request for a team December 27, 2024 17:35
@mergify mergify bot assigned rdner Dec 27, 2024
Copy link

Quality Gate passed Quality Gate passed

Issues
0 New issues
0 Fixed issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarQube

Copy link
Contributor Author

mergify bot commented Dec 30, 2024

This pull request has not been merged yet. Could you please review and merge it @rdner? 🙏

@jlind23 jlind23 merged commit c96eab1 into 8.16 Dec 30, 2024
15 checks passed
@jlind23 jlind23 deleted the mergify/bp/8.16/pr-6393 branch December 30, 2024 06:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants