Skip to content

Commit

Permalink
using supervisor to start keepalived
Browse files Browse the repository at this point in the history
  • Loading branch information
fanux committed Nov 20, 2018
1 parent 15e764c commit 02f379c
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
14 changes: 8 additions & 6 deletions Dockerfile-keepalived
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
FROM centos:7.4.1708
RUN yum install -y wget && yum install -y gcc-c++ openssl-devel openssl && yum install -y net-tools
RUN wget -O /usr/local/bin/dumb-init \
https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 \
&& chmod +x /usr/local/bin/dumb-init
RUN yum install -y wget && yum install -y gcc-c++ openssl-devel openssl && yum install -y net-tools && yum install -y python-setuptools && easy_install supervisor
# RUN wget -O /usr/local/bin/dumb-init \
# https://github.com/Yelp/dumb-init/releases/download/v1.2.2/dumb-init_1.2.2_amd64 \
# && chmod +x /usr/local/bin/dumb-init
RUN wget http://www.keepalived.org/software/keepalived-2.0.8.tar.gz && tar zxvf keepalived-2.0.8.tar.gz && cd keepalived-2.0.8 && ./configure && make && make install
ENTRYPOINT ["/usr/bin/dumb-init", "--"]
CMD ["keepalived", "--all", "-d", "-D", "-f", "/etc/keepalived/keepalived.conf", "--log-console"]
# ENTRYPOINT ["/usr/local/bin/dumb-init", "--"]
# CMD ["keepalived", "--all", "-d", "-D", "-f", "/etc/keepalived/keepalived.conf", "--log-console"]
COPY super-keep.conf .
CMD ["supervisord", "-c", "super-keep.conf"]
9 changes: 9 additions & 0 deletions super-keep.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
[program:keepalived]
command=keepalived --all -d -D -f /etc/keepalived/keepalived.conf --log-console
autostart=true
autorestart=false
startsecs=1
redirect_stderr = true

[supervisord]
nodaemon = true

0 comments on commit 02f379c

Please sign in to comment.