2015-07-29 08:45:41 +00:00
|
|
|
|
FROM osixia/light-baseimage:0.1.1
|
2015-06-09 18:41:43 +00:00
|
|
|
|
MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.net>
|
|
|
|
|
|
2015-06-16 09:13:22 +00:00
|
|
|
|
# Keepalived version
|
2015-07-09 19:41:14 +00:00
|
|
|
|
ENV KEEPALIVED_VERSION 1.2.19
|
2015-06-15 19:33:06 +00:00
|
|
|
|
|
2015-07-23 10:11:36 +00:00
|
|
|
|
# Use baseimage's init system.
|
|
|
|
|
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/run
|
|
|
|
|
CMD ["/container/tool/run"]
|
2015-06-09 18:41:43 +00:00
|
|
|
|
|
|
|
|
|
# Install Keepalived
|
|
|
|
|
RUN apt-get -y update \
|
2015-06-16 09:13:22 +00:00
|
|
|
|
&& LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
2015-07-23 10:11:36 +00:00
|
|
|
|
curl \
|
|
|
|
|
make \
|
|
|
|
|
gcc \
|
|
|
|
|
pkg-config \
|
|
|
|
|
libssl-dev \
|
|
|
|
|
libnl-3-dev \
|
|
|
|
|
libnl-genl-3-dev \
|
2015-06-16 09:13:22 +00:00
|
|
|
|
&& curl -o keepalived.tar.gz -SL http://keepalived.org/software/keepalived-${KEEPALIVED_VERSION}.tar.gz \
|
2015-07-23 10:11:36 +00:00
|
|
|
|
&& mkdir -p /container/keepalived-sources \
|
|
|
|
|
&& tar -xzf keepalived.tar.gz --strip 1 -C /container/keepalived-sources \
|
|
|
|
|
&& cd container/keepalived-sources \
|
2015-06-16 09:13:22 +00:00
|
|
|
|
&& ./configure --with-kernel-dir=/lib/modules/$(uname -r)/build \
|
|
|
|
|
&& make && make install \
|
|
|
|
|
&& cd - && mkdir -p /etc/keepalived \
|
2015-07-16 19:43:36 +00:00
|
|
|
|
&& apt-get remove -y --purge --auto-remove curl make gcc pkg-config libssl-dev
|
2015-06-09 18:41:43 +00:00
|
|
|
|
|
2015-07-23 10:11:36 +00:00
|
|
|
|
# Add service directory to /container/service
|
|
|
|
|
ADD service /container/service
|
2015-06-09 18:41:43 +00:00
|
|
|
|
|
2015-07-16 19:43:36 +00:00
|
|
|
|
# Use baseimage install-service script and clean all
|
2015-07-23 10:11:36 +00:00
|
|
|
|
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/install-service
|
|
|
|
|
RUN /container/tool/install-service \
|
|
|
|
|
&& rm -f keepalived.tar.gz \
|
|
|
|
|
&& rm -rf /container/keepalived-sources \
|
|
|
|
|
&& apt-get clean \
|
|
|
|
|
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
2015-06-09 18:41:43 +00:00
|
|
|
|
|
|
|
|
|
# Add default env variables
|
2015-07-17 09:46:49 +00:00
|
|
|
|
ADD env.yaml /etc/env.yaml
|