Skip to content

Commit 2bd5289

Browse files
committed
Adding a Dockerfile
1 parent 38a43f1 commit 2bd5289

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed

docker/Dockerfile

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
FROM centos
2+
ENV container docker
3+
4+
RUN yum -y update; yum clean all
5+
RUN yum -y install systemd; yum clean all; \
6+
(cd /lib/systemd/system/sysinit.target.wants/; for i in *; do [ $i == systemd-tmpfiles-setup.service ] || rm -f $i; done); \
7+
rm -f /lib/systemd/system/multi-user.target.wants/*;\
8+
rm -f /etc/systemd/system/*.wants/*;\
9+
rm -f /lib/systemd/system/local-fs.target.wants/*; \
10+
rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
11+
rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
12+
rm -f /lib/systemd/system/basic.target.wants/*;\
13+
rm -f /lib/systemd/system/anaconda.target.wants/*;
14+
RUN yum install -y https://s3-us-west-2.amazonaws.com/grafana-releases/release/grafana-4.4.1-1.x86_64.rpm epel-release git make gcc-c++; yum install -y nodejs npm; yum clean all;
15+
RUN git clone https://github.com/skydive-project/skydive-grafana-datasource.git; \
16+
cd skydive-grafana-datasource; \
17+
npm install; \
18+
./node_modules/grunt-cli/bin/grunt; \
19+
mkdir -p /var/lib/grafana/plugins; \
20+
ln -s `pwd`/dist /var/lib/grafana/plugins/skydive-grafana-datasource;
21+
RUN systemctl enable grafana-server
22+
23+
#build :
24+
# docker build --rm -t centos7-systemd-grafana-skydive .
25+
#run the container with :
26+
# docker run --privileged --network="host" -p 3000:3000 -ti -e container=docker -v /run -v /sys/fs/cgroup:/sys/fs/cgroup:ro --name grafana centos7-systemd-grafana-skydive /usr/sbin/init

0 commit comments

Comments
 (0)