fleet/tools/fleetd-linux/build-all.sh
Lucas Manuel Rodriguez 52948b25af
Update fleetd linux docker images used for testing (#44415)
Removing some unmaintained/old docker images (Amazon Linux and CentOS),
and keeping most used/updated (Debian, Ubuntu, and Fedora).

Use cases for this:
- I used this to test wiping a linux host (without needing to wipe my
VMs).
- Test fleetd on linux amd64 on Apple Silicon (VMs usually are arm64).

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

* **New Features**
  * Added support for Fedora 43 and Debian 13.4 container images.

* **Bug Fixes**
* Improved environment variable validation and configuration handling in
the fleetd initialization process.
  * Enhanced build process reliability with stricter error handling.

* **Chores**
* Removed support for older container images (Amazon Linux 2023, CentOS
Stream 10, Fedora 41, Debian 12.8).
* Streamlined Docker Compose configuration with improved security
defaults.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
2026-04-29 15:37:27 -03:00

31 lines
973 B
Bash
Executable file

#!/bin/bash
set -euo pipefail
script_dir=$(dirname -- "$(readlink -f -- "$BASH_SOURCE")")
cd "$script_dir"
echo "Building fleetd deb package..."
fleetctl package --type=deb \
--enable-scripts \
--fleet-url=https://host.docker.internal:8080 \
--enroll-secret=placeholder \
--fleet-certificate=../osquery/fleet.crt \
--disable-open-folder \
--outfile=fleet-osquery_amd64.deb \
--debug
echo "Building fleetd rpm package..."
fleetctl package --type=rpm \
--enable-scripts \
--fleet-url=https://host.docker.internal:8080 \
--enroll-secret=placeholder \
--fleet-certificate=../osquery/fleet.crt \
--disable-open-folder \
--outfile=fleet-osquery_amd64.rpm \
--debug
echo "Building docker images..."
docker build -t fleetd-ubuntu-24.04 --platform=linux/amd64 -f ./ubuntu-24.04/Dockerfile .
docker build -t fleetd-fedora-43 --platform=linux/amd64 -f ./fedora-43/Dockerfile .
docker build -t fleetd-debian-13.4 --platform=linux/amd64 -f ./debian-13.4/Dockerfile .