Public | Automated Build

Last pushed: 4 months ago
Short Description
Oracle JDK8, Filebeat and Consul Image
Full Description

JDK8 + Filebeat + Consul

Oracle JDK8, Filebeat and Consul Image

This image comes with an Spring Boot example app that shows enviroment variables on http://localhost:8080/info, replace /app/app.jar by your aplication package.

Filebeat

Configure the variables below for Filebeat.

  • FILEBEAT_NAME: The name of the shipper that publishes the network data. It can be used to group all the transactions sent by a single shipper in the web interface, default unknown.
  • FILEBEAT_TAGS: The tags of the shipper are included in their own field with each transaction published, default unknown.
  • FILEBEAT_HOSTS: The Logstash hosts.
  • FILEBEAT_INDEX: Optional index name. The default index name is set to name of the beat in all lowercase.

Consul

Configured to run in client mode, important variables below.

  • CONSUL_INTERFACE: Define Consul advertise interface, default eth0.
  • CONSUL_SERVER: Define Consul Server hostname, default consul-server.
  • IP: Result of expression ip -f inet addr | grep inet | grep $CONSUL_INTERFACE | awk '{ print $2; }' | awk 'BEGIN { FS="/"; } { print $1; }'. Obs.: Cannot be overridden.

Usage

Command Line

$ docker run -it --name jdk8 -p 8080:8080 -e FILEBEAT_NAME=jdk8-filebeat-consul -e FILEBEAT_TAGS=example -e FILEBEAT_HOSTS=elkhost:5044 -e FILEBEAT_INDEX=example -v $PWD/application.jar:/app/app.jar --add-host=elkhost:10.100.2.1 rodrigozc/jdk8-filebeat-consul

Dockerfile

FROM rodrigozc/jdk8-filebeat-consul
MAINTAINER Rodrigo Zampieri Castilho <rodrigo.zampieri@gmail.com>

ENV FILEBEAT_NAME jdk8-filebeat-consul
ENV FILEBEAT_TAGS example
ENV FILEBEAT_HOSTS elkhost:5044
ENV FILEBEAT_INDEX example

ENV ARGS -Xmx512m

ADD application.jar /app/app.jar
ADD application.yml /app/application.yml
Docker Pull Command
Owner
rodrigozc
Source Repository

Comments (0)