Skip to content

Instantly share code, notes, and snippets.

@joshuarubin
Last active August 29, 2015 14:20
Show Gist options
  • Save joshuarubin/0d4405f8fb9b69164aed to your computer and use it in GitHub Desktop.
Save joshuarubin/0d4405f8fb9b69164aed to your computer and use it in GitHub Desktop.
Hystrix Dashboard Dockerfile
FROM java
WORKDIR /app
ENV HYSTRIX_DASHBOARD_VERSION 1.4.5
ENV JETTY_RUNNER_VERSION 9.2.9.v20150224
ADD http://central.maven.org/maven2/com/netflix/hystrix/hystrix-dashboard/${HYSTRIX_DASHBOARD_VERSION}/hystrix-dashboard-${HYSTRIX_DASHBOARD_VERSION}.war /app/hystrix-dashboard.war
ADD http://central.maven.org/maven2/org/eclipse/jetty/jetty-runner/${JETTY_RUNNER_VERSION}/jetty-runner-${JETTY_RUNNER_VERSION}.jar /app/jetty-runner.jar
EXPOSE 5406
ENTRYPOINT ["java", "-jar", "jetty-runner.jar", "--port", "5406"]
CMD ["hystrix-dashboard.war"]
#!/bin/sh
docker build -t zvelo/zvelo-hystrix-dashboard .
docker run --rm -it -P zvelo/zvelo-hystrix-dashboard
[Unit]
Description=zvelo-hystrix-dashboard service
Requires=etcd.service
After=etcd.service
[Service]
User=core
ExecStartPre=-/usr/bin/docker kill %p-%i
ExecStartPre=-/usr/bin/docker rm %p-%i
ExecStartPre=/usr/bin/docker pull zvelo/%p
ExecStart=/usr/bin/docker run --rm -P zvelo/%p
ExecStop=/usr/bin/docker stop %p-%i
Restart=always
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment