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

Change the base docker image to ubuntu 20.04 for Beats & Elastic Agent #29255

Closed
nimarezainia opened this issue Dec 2, 2021 · 7 comments · Fixed by #29681
Closed

Change the base docker image to ubuntu 20.04 for Beats & Elastic Agent #29255

nimarezainia opened this issue Dec 2, 2021 · 7 comments · Fixed by #29681
Labels
good first issue Indicates a good issue for first-time contributors Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team v7.17.0

Comments

@nimarezainia
Copy link
Contributor

Describe the enhancement:

Beats and Agent to be aligned with other Elastic products and change the default image to ubuntu 20.04

Describe a specific use case for the enhancement or feature:

@botelastic botelastic bot added the needs_team Indicates that the issue/PR needs a Team:* label label Dec 2, 2021
@jlind23 jlind23 added the Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team label Dec 3, 2021
@elasticmachine
Copy link
Collaborator

Pinging @elastic/elastic-agent-control-plane (Team:Elastic-Agent-Control-Plane)

@botelastic botelastic bot removed the needs_team Indicates that the issue/PR needs a Team:* label label Dec 3, 2021
@jlind23 jlind23 added good first issue Indicates a good issue for first-time contributors 7.12 candidate labels Dec 3, 2021
@dsmello
Copy link

dsmello commented Dec 8, 2021

Hello, I'll try to close this issue 😄 .

@nimarezainia, What Dockerfile I must change? Those are all Dockerfiles at this project.

./metricbeat/Dockerfile
./metricbeat/module/nginx/_meta/Dockerfile
./metricbeat/module/kibana/_meta/Dockerfile
./metricbeat/module/consul/_meta/Dockerfile
./metricbeat/module/rabbitmq/_meta/Dockerfile
./metricbeat/module/couchbase/_meta/Dockerfile
./metricbeat/module/prometheus/_meta/Dockerfile
./metricbeat/module/apache/_meta/Dockerfile
./metricbeat/module/redis/_meta/Dockerfile
./metricbeat/module/traefik/_meta/Dockerfile
./metricbeat/module/php_fpm/Dockerfile
./metricbeat/module/php_fpm/_meta/Dockerfile
./metricbeat/module/dropwizard/_meta/Dockerfile
./metricbeat/module/munin/_meta/Dockerfile
./metricbeat/module/vsphere/_meta/Dockerfile
./metricbeat/module/postgresql/_meta/Dockerfile
./metricbeat/module/aerospike/_meta/Dockerfile
./metricbeat/module/kafka/_meta/Dockerfile
./metricbeat/module/envoyproxy/_meta/Dockerfile
./metricbeat/module/couchdb/_meta/Dockerfile
./metricbeat/module/openmetrics/_meta/Dockerfile
./metricbeat/module/beat/_meta/Dockerfile
./metricbeat/module/uwsgi/_meta/Dockerfile
./metricbeat/module/zookeeper/_meta/Dockerfile
./metricbeat/module/ceph/_meta/Dockerfile.jewel
./metricbeat/module/ceph/_meta/Dockerfile.nautilus
./metricbeat/module/haproxy/_meta/Dockerfile
./metricbeat/module/etcd/_meta/Dockerfile
./metricbeat/module/jolokia/_meta/Dockerfile
./metricbeat/module/golang/_meta/Dockerfile
./metricbeat/module/logstash/_meta/Dockerfile
./metricbeat/module/elasticsearch/_meta/Dockerfile
./metricbeat/module/mysql/_meta/Dockerfile
./metricbeat/module/mongodb/_meta/Dockerfile
./metricbeat/module/nats/_meta/Dockerfile
./metricbeat/module/http/_meta/Dockerfile
./metricbeat/module/memcached/_meta/Dockerfile
./libbeat/Dockerfile
./testing/environments/Dockerfile
./testing/environments/docker/mosquitto/Dockerfile
./testing/environments/docker/redis/Dockerfile
./testing/environments/docker/kerberos_kdc/Dockerfile
./testing/environments/docker/kafka/Dockerfile
./testing/environments/docker/sredis/Dockerfile
./testing/environments/docker/elasticsearch_kerberos/Dockerfile
./filebeat/input/redis/_meta/Dockerfile
./filebeat/tests/open-file-handlers/Dockerfile-log
./filebeat/tests/open-file-handlers/Dockerfile-filebeat
./filebeat/Dockerfile
./dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl
./dev-tools/packaging/templates/docker/Dockerfile.tmpl
./x-pack/metricbeat/module/tomcat/_meta/Dockerfile
./x-pack/metricbeat/module/istio/_meta/Dockerfile
./x-pack/metricbeat/module/enterprisesearch/_meta/Dockerfile
./x-pack/metricbeat/module/coredns/_meta/Dockerfile
./x-pack/metricbeat/module/cockroachdb/_meta/Dockerfile
./x-pack/metricbeat/module/oracle/_meta/Dockerfile
./x-pack/metricbeat/module/ibmmq/_meta/Dockerfile
./x-pack/metricbeat/module/redisenterprise/_meta/Dockerfile
./x-pack/metricbeat/module/activemq/_meta/Dockerfile
./x-pack/metricbeat/module/mssql/_meta/Dockerfile
./x-pack/metricbeat/module/stan/_meta/Dockerfile
./x-pack/libbeat/Dockerfile
./x-pack/functionbeat/Dockerfile
./x-pack/filebeat/input/gcppubsub/_meta/Dockerfile
./x-pack/dockerlogbeat/Dockerfile.tmpl
./x-pack/elastic-agent/Dockerfile
./auditbeat/Dockerfile
./heartbeat/tests/docker_support/redis/Dockerfile
./heartbeat/Dockerfile
./packetbeat/Dockerfile

@jlind23
Copy link
Collaborator

jlind23 commented Dec 9, 2021

I would say all of them. @ruflin for confirmation.

@ruflin
Copy link
Contributor

ruflin commented Dec 9, 2021

AFAIK the two relevant ones for the build process are

./dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl
./dev-tools/packaging/templates/docker/Dockerfile.tmpl

I see there are some more .tmpl files which might be relevant to change. @andrewkroh You might be able to chime in on this.

The one in the *beat/ directories are mostly used for testing and depend on Go images. I would not change these. All the Dockerfiles in the modules directory are service specific and should not be changed.

@ruflin
Copy link
Contributor

ruflin commented Dec 9, 2021

@jsoriano Pinging you because I think you also touched this in the past.

@jsoriano
Copy link
Member

jsoriano commented Dec 9, 2021

Yes, the changes should be done in these Dockerfile templates, to adapt the commands that install packages to use apt-get instead of yum.

Images used are the ones in the from and buildFrom keys in the packages.yml definition file.

So in principle the files to modify are these ones:

./dev-tools/packaging/templates/docker/Dockerfile.elastic-agent.tmpl
./dev-tools/packaging/templates/docker/Dockerfile.tmpl
./dev-tools/packaging/packages.yml

@dsmello
Copy link

dsmello commented Dec 9, 2021

Hello all,
I open the PR, If U can review 😸 and give some tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Indicates a good issue for first-time contributors Team:Elastic-Agent-Control-Plane Label for the Agent Control Plane team v7.17.0
Projects
None yet
6 participants