Created
March 17, 2017 16:55
-
-
Save maurorappa/2a41db73ac46e4a3b3eab22a7881e5fc to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:latest | |
MAINTAINER The CentOS Project <[email protected]> | |
LABEL Vendor="CentOS" | |
RUN yum -y install sensu erlang rabbitmq-server redis | |
# rename sample config | |
RUN mv /etc/sensu/config.json.example /etc/sensu/config.json | |
# setup rabbitmq | |
RUN echo $HOSTNAME && /etc/init.d/rabbitmq-server start && rabbitmqctl add_vhost /sensu && rabbitmqctl add_user sensu sensu && rabbitmqctl set_permissions -p /sensu sensu ".*" ".*" ".*" | |
#start all services | |
ENTRYPOINT redis-server --daemonize yes && /etc/init.d/rabbitmq-server start && /etc/init.d/sensu-server start && /etc/init.d/sensu-api start && /etc/init.d/sensu-client start && bash | |
#expose sensu api port | |
EXPOSE 4567 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Note: rabbitmq saves all configs related to the hostname, containers hostname is random, let's keep track of the shim used for its configuration (line 8)
Run:
docker run -ti --rm --hostname <$HOSTNAME>
Test
curl http:// <$container ip> :4567/info