GHOSTby AlphaBravo
CatalogWhy GhostContactAccount
Ghost Container Registry — Secure, signed, FIPS-ready images·Built by AlphaBravo
Catalog/filebeat/Guides

filebeat

FIPS 140-3Monitoring & observability

Filebeat sends log files to Logstash or directly to Elasticsearch

OverviewGuidesTags

Quick Start

Pull the latest version of this image from the Ghost registry. Pulling requires authentication — generate a token and run docker login first (see Authentication below).

Authentication

The Ghost catalog is public to browse, but pulling images requires an account. Generate a pull token below (or from your Account → Tokens page) — you'll get a ready-to-paste docker login command, then docker pull works.

The username is generated automatically (it looks like robot$<project>+<auto-id>, not the name you typed) and is included in the docker login command above. The secret is shown only once when you create the token.

Verify Signature

All Ghost images are signed with cosign. Verifying the signature before deployment ensures the image has not been tampered with.

Install cosign via brew install cosign or download from the Sigstore releases page.

Using This Image

Reference this image in your Dockerfile as a base layer:

FIPS 140-3 Compliance

This is a vendor-built FIPS-enabled image: its cryptography runs on FIPS 140-3 validated modules configured by the upstream vendor. You can inspect the image metadata:

StandardFIPS 140-3
Crypto moduleVendor-configured validated modules
CryptographyValidated modules only
Use caseGovernment, regulated industries, compliance workloads

Additional Notes

How to use this image

All examples in this guide use the public image. If you’ve mirrored the repository for your own use (for example, to your Docker Hub namespace), update your commands to reference the mirrored image instead of the public one.

For example:

  • Public image: registry.ghost-prod.alphabravo.io/ghost-base/<repository>:<tag>
  • Mirrored image: <your-namespace>/dhi-<repository>:<tag>

For the examples, you must first use docker login registry.ghost-prod.alphabravo.io to authenticate to the registry to pull the images.

Start a Filebeat instance

Run the following command to run a Filebeat container. Replace <tag> with the image variant you want to run.

docker run --rm  registry.ghost-prod.alphabravo.io/ghost-base/filebeat:<tag> version

This command runs Filebeat and prints the version information. The entry point is filebeat so you can pass any filebeat command or flags directly.

Common Filebeat use cases

On this page

Quick StartAuthenticationVerify SignatureUsing This ImageFIPS ComplianceAdditional Notes

Run Filebeat with Compose and a custom configuration

This example shows Filebeat shipping logs to Elasticsearch with Kibana for visualization. It uses a custom filebeat.yml configuration file and mounts a local logs directory into the container to read log files.

First, create a compose.yaml file:

services:
  elasticsearch:
    image: registry.ghost-prod.alphabravo.io/ghost-base/elasticsearch:<tag>
    environment:
      - discovery.type=single-node
      - xpack.security.enabled=false
    ports:
      - "9200:9200"

  kibana:
    image: registry.ghost-prod.alphabravo.io/ghost-base/kibana:<tag>
    environment:
      - ELASTICSEARCH_HOSTS=http://elasticsearch:9200
    ports:
      - "5601:5601"
    depends_on:
      - elasticsearch
    volumes:
      - kibana_conf:/opt/kibana/kibana-<tag>/config

  filebeat:
    image: registry.ghost-prod.alphabravo.io/ghost-base/filebeat:<tag>
    volumes:
      - ./filebeat.yml:/usr/share/filebeat/filebeat.yml:ro
      - ./logs:/var/log:ro
    depends_on:
      - elasticsearch

volumes:
  kibana_conf:

Then, create a filebeat.yml configuration file:

filebeat.inputs:
- type: filestream
  enabled: true
  paths:
    - /var/log/*.log

output.elasticsearch:
  hosts: ["elasticsearch:9200"]

processors:
- add_host_metadata:
    when.not.contains.tags: forwarded

Run the Compose stack:

docker compose up -d

View logs in Kibana at http://localhost:5601

For more configuration options see the official Filebeat documentation.

Use Filebeat in Kubernetes

To use the Filebeat hardened image in Kubernetes, set up authentication and update your Kubernetes deployment. For example, in your filebeat.yaml file, replace the image reference in the container spec. In the following example, replace <tag> with the desired tag.

apiVersion: apps/v1
kind: Deployment
metadata:
  name: filebeat
  namespace: <kubernetes-namespace>
spec:
  template:
    spec:
      containers:
        - name: filebeat
          image: registry.ghost-prod.alphabravo.io/ghost-base/filebeat:<tag>
      imagePullSecrets:
        - name: <your-registry-secret>

Then apply the manifest to your Kubernetes cluster.

$ kubectl apply -n <kubernetes-namespace> -f filebeat.yaml

Image variants

Ghost hardened images come in different variants depending on their intended use. The Filebeat image comes in both runtime and build-time variants. Runtime variants are designed to run your application in production. These images are intended to be used either directly or as the FROM image in the final stage of a multi-stage build. These images typically:

  • Run as the nonroot user

  • Do not include a shell or a package manager

  • Contain only the minimal set of libraries needed to run the app

  • FIPS variants include fips in the variant name and tag. They come in both runtime and build-time variants. These variants use cryptographic modules that have been validated under FIPS 140, a U.S. government standard for secure cryptographic operations. For example, usage of MD5 fails in FIPS variants.

Non-hardened image vs. Ghost hardened image

Key differences

FeatureNon-hardened FilebeatDocker Hardened Filebeat
Base imageRed Hat UBIDebian 13
UserRuns as user ID 1000 (filebeat user)Runs as user ID 1000 (nonroot user)
Entrypoint/usr/bin/tini -- /usr/local/bin/docker-entrypointDirect filebeat binary
Shell accessShell availableNo shell available
Package managermicrodnf availableNo package manager available
Default command--environment containerHTTP monitoring enabled with Unix socket
Attack surfaceLarger due to additional utilitiesMinimal, only contains essential components
DebuggingTraditional shell debuggingUse Docker Debug or image mount for troubleshooting

Why no shell or package manager?

Ghost hardened images prioritize security through minimalism:

  • Reduced attack surface: Fewer binaries mean fewer potential vulnerabilities
  • Immutable infrastructure: Runtime containers shouldn't be modified after deployment
  • Compliance ready: Meets strict security requirements for regulated environments

The hardened images intended for runtime don't contain a shell nor any tools for debugging. Common debugging methods for applications built with Ghost hardened images include:

  • Docker Debug to attach to containers
  • Docker's Image Mount feature to mount debugging tools
  • Ecosystem-specific debugging approaches

Docker Debug provides a shell, common debugging tools, and lets you install other tools in an ephemeral, writable layer that only exists during the debugging session.

For example, you can use Docker Debug:

docker debug <image-name>

or mount debugging tools with the Image Mount feature:

docker run --rm -it --pid container:my-container \
  --mount=type=image,source=registry.ghost-prod.alphabravo.io/ghost-base/busybox,destination=/dbg,ro \
  registry.ghost-prod.alphabravo.io/ghost-base/<image-name>:<tag> /dbg/bin/sh

Migrate to a Ghost hardened image

Migrating to the hardened Filebeat image requires some adjustments due to differences in entrypoint and default behavior. While most configuration remains compatible, you'll need to account for the streamlined approach of the hardened image.

Migration steps

  1. Update your image reference.

    Replace the image reference in your Docker run command or Compose file:

    • From: docker.elastic.co/beats/filebeat:<tag>
    • To: registry.ghost-prod.alphabravo.io/ghost-base/filebeat:<tag>
  2. Adjust command arguments if needed.

    The hardened image uses a direct filebeat entrypoint instead of the tini wrapper.

    If you override the default command, ensure your arguments are compatible with the filebeat binary directly.

  3. Verify configuration compatibility.

    Your existing environment variables, volume mounts, and network settings should remain the same, but test thoroughly as the hardened image may behave differently in edge cases.

General migration considerations

While the specific configuration requires no changes, be aware of these general differences in Ghost hardened images:

ItemMigration note
Base imagesBased on hardened Debian, not Red Hat UBI
Shell accessNo shell in runtime variants, use Docker Debug for troubleshooting
Package managerNo package manager in runtime variants
DebuggingUse Docker Debug or image mount instead of traditional shell debugging

Troubleshooting migration

The following are common issues that you may encounter during migration.

General debugging

The hardened images intended for runtime don't contain a shell nor any tools for debugging. The recommended method for debugging applications built with Ghost hardened images is to use Docker Debug to attach to these containers. Docker Debug provides a shell, common debugging tools, and lets you install other tools in an ephemeral, writable layer that only exists during the debugging session.

Permissions

By default image variants intended for runtime, run as the nonroot user. Ensure that necessary files and directories are accessible to the nonroot user. You may need to copy files to different directories or change permissions so your application running as the nonroot user can access them.

Privileged ports

Non-dev hardened images run as a nonroot user by default. As a result, applications in these images can't bind to privileged ports (below 1024) when running in Kubernetes or in Docker Engine versions older than 20.10. To avoid issues, configure your application to listen on port 1025 or higher inside the container, even if you map it to a lower port on the host.

No shell

By default, image variants intended for runtime don't contain a shell. Use dev images in build stages to run shell commands and then copy any necessary artifacts into the runtime stage. In addition, use Docker Debug to debug containers with no shell.

Entry point

Ghost hardened images may have different entry points than images such as Docker Official Images. Use docker inspect to inspect entry points for Ghost hardened images and update your Dockerfile if necessary.