Install Vector On Docker

Vector maintains the timberio/vector Docker images available on Docker Hub which come pre-installed with Vector and any recommended system dependencies. These images are available for x86_64, ARM64, and ARMv7 architectures.

Install

The daemon deployment strategy is designed for data collection on a single host. Vector runs in the background, in its own process, collecting all data for that host. Typically data is collected from a process manager, such as Journald via Vector's journald source, but can be collected through any of Vector's sources. The following diagram demonstrates how it works.

Vector daemon deployment strategyVector daemon deployment strategy
1. Your service logs to STDOUT
STDOUT follows the 12 factor principles.
2. STDOUT is captured
STDOUT is captured by your platform.
3. Vector collects & fans-out data
Vector collects data from your platform.

  1. Configure Vector

    Where do you want to send your data?
    Console
    cat <<-VECTORCFG > /etc/vector/vector.toml
    [sources.in]
    type = "docker" # required
    [sinks.out]
    # General
    type = "console" # required
    inputs = ["in"] # required
    # Encoding
    encoding.codec = "json" # required
    VECTORCFG
    explain this command
  2. Start the Vector container

    docker run \
    -v $PWD/vector.toml:/etc/vector/vector.toml:ro \
    -v /var/run/docker.sock:/var/run/docker.sock \
    timberio/vector:latest-alpine
    explain this command

    That's it! Simple and to the point. Hit ctrl+c to exit.

Configuring

As shown above, you can pass a custom Vector configuration file via the -v flag. You'll want to do this since the default /etc/vector/vector.toml configuration file doesn't do anything.

Deploying

How you deploy Vector is largely dependent on your use case and environment. Please see the deployment section for more info on how to deploy Vector.

Updating

Simply run with newer version in the tag:

docker pull timberio/vector:X.X.X-alpine && \
docker run timberio/vector:X.X.X-alpine

See the variants and versions sections to choose the appropriate image for your use case.

Images

Variants

alpine

This image is based on the alpine Docker image, which is a Linux distribution built around musl libc and BusyBox. It is considerably smaller in size than other Docker images and statically links libraries. This is the image we recommend due to it's small size and reliability.

docker run timberio/vector:0.9.2-alpine

debian

This image is based on the debian-slim image, which is a smaller, more compact variant of the debian image.

docker run timberio/vector:0.9.2-debian

Architectures

Vector's images are multi-arch and support the x86_64, ARM64, and ARMv7 architectures. Docker handles this transparently for you.

Versions

Vector's Docker images can be downloaded with the following tags. Note that Vector maintains special tags that are automatically updated whenever Vector is released:

VersionURL
Latest majortimberio/vector:latest-alpine
Latest minortimberio/vector:<MAJOR>.X-alpine
Latest patchtimberio/vector:<MAJOR.MINOR>.X-alpine
Specific versiontimberio/vector:<MAJOR.MINOR.PATCH>-alpine
Latest nightlytimberio/vector:nightly-alpine
Specific nightlytimberio/vector:nightly-<YYYY-MM-DD>-alpine

Source Files

Vector's Docker source files are located in it's Github repo.