init commit

master
will Farrell 2016-07-07 12:37:46 -06:00
commit 655e594684
3 changed files with 27 additions and 0 deletions

4
Dockerfile 100644
View File

@ -0,0 +1,4 @@
FROM alpine:3.4
RUN apk add --update bash && rm -rf /var/cache/apk/*
COPY ping /
CMD ["/ping"]

19
README.md 100644
View File

@ -0,0 +1,19 @@
# ping
## ENV
- `HOSTNAME` Server you would liek to continuously ping
- `TIMEOUT` Number of seconds between timeouts
## docker-compose.yml
```yml
version: "2"
services:
ping:
image: watsco/ping
restart: always
environment:
HOSTNAME: "10.0.0.61"
TIMEOUT: 300
```

4
ping 100755
View File

@ -0,0 +1,4 @@
#!/bin/bash
echo ping $HOSTNAME every $TIMEOUT sec
while true; do ping -c 1 $HOSTNAME; sleep $TIMEOUT; done;