Self-contained Docker image containing Java and Apache Flume
$ docker pull probablyfine/flume
$ docker run \
--env FLUME_AGENT_NAME=docker \
--volume /tmp/config.conf:/opt/flume-config/flume.conf \
--detach \
probablyfine/flume:latest
Note: the FLUME_AGENT_NAME
environment variable and presence of /opt/flume-config/flume.conf
on the image are required.
Set up configuration directory and required environment variables in a Dockerfile
FROM probablyfine/flume
ENV FLUME_AGENT_NAME docker
ADD flume.conf /opt/flume-config/flume.conf
Build and run image
$ docker build -t my-flume-image .
$ docker run --detch my-flume-image