1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-08 04:04:42 +02:00

add vnstat

This commit is contained in:
kev 2016-06-17 18:06:40 +08:00
parent b07cbeabd8
commit 315904fd53
4 changed files with 51 additions and 0 deletions

View File

@ -124,6 +124,7 @@ A collection of delicious docker recipes.
- [x] tmail :beetle:
- [x] tor
- [x] urlwatch :beetle:
- [x] vnstat
- [x] vsftpd
- [x] webgoat
- [x] webhook

16
vnstat/Dockerfile Normal file
View File

@ -0,0 +1,16 @@
#
# Dockerfile for vnstat
#
FROM debian:jessie
MAINTAINER kev <noreply@easypi.info>
RUN set -xe \
&& apt-get update \
&& apt-get install -y vnstat vnstati \
&& sed -i '/UseLogging/s/2/0/' /etc/vnstat.conf \
&& rm -rf /var/lib/apt/lists/*
VOLUME /var/lib/vnstat
CMD ["vnstatd", "-n"]

28
vnstat/README.md Normal file
View File

@ -0,0 +1,28 @@
vnstat
======
[vnStat][1] is a console-based network traffic monitor for Linux and BSD that keeps
a log of network traffic for the selected interface(s).
### docker-compose.yml
```yaml
vnstat:
image: vimagick/vnstat
volumes:
- ./data:/var/lib/vnstat
net: host
restart: always
```
### up and running
```bash
docker-compose up -d
docker-compose exec vnstat bash
>>> vnstat --help
>>> vnstati --help
>>> exit
```
[1]: http://humdi.net/vnstat/

View File

@ -0,0 +1,6 @@
vnstat:
image: vimagick/vnstat
volumes:
- ./data:/var/lib/vnstat
net: host
restart: always