-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
44 lines (36 loc) · 1.25 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
NAME=wfhinc/logspout-honeycomb
BUILD_DIR=build
# If you want to configure the Honeycomb Logspout adapter with environment
# variables, set them here. Otherwise you need to use the RoutesAPI.
# HONEYCOMB_WRITE_KEY=
# HONEYCOMB_DATASET=
# Builds a Docker image of LogSpout with the Honeycomb adapter included.
docker:
docker build -t $(NAME) image
docker-no-cache:
docker build --no-cache -t $(NAME) image
# Fire up a container with the Honeycomb Logspout adapter in it,
# configured by environment variables
run-with-env:
docker run \
-e "ROUTE_URIS=honeycomb://localhost" \
-e "HONEYCOMB_WRITE_KEY=$(HONEYCOMB_WRITE_KEY)" \
-e "HONEYCOMB_DATASET=$(HONEYCOMB_DATASET)" \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--publish=127.0.0.1:8000:80 \
$(NAME)
# Fire up a container with the Honeycomb Logspout adapter in it
run:
docker run \
--volume=/var/run/docker.sock:/var/run/docker.sock \
--publish=127.0.0.1:8000:80 \
$(NAME)
# Launches a Docker image that logs random JSON messages every second
random-source:
docker run alpine /bin/sh -c \
'while true; do echo {\"random\": `echo $$RANDOM`}; sleep 1; done'
clean:
rm -rf $(BUILD_DIR)
docker rmi -f $(NAME)
clean-images:
docker images | grep none | awk '{print $3}' | xargs docker rmi -f