2016-01-17 11:12:04 +00:00
|
|
|
|
# Use osixia/light-baseimage
|
|
|
|
|
# sources: https://github.com/osixia/docker-light-baseimage
|
|
|
|
|
FROM osixia/light-baseimage:0.2.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
|
|
|
|
|
2016-01-17 11:12:04 +00:00
|
|
|
|
# Download, build and install Keepalived
|
2015-06-09 18:41:43 +00:00
|
|
|
|
RUN apt-get -y update \
|
2015-12-21 20:39:16 +00:00
|
|
|
|
&& LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
|
2016-01-17 11:12:04 +00:00
|
|
|
|
curl \
|
|
|
|
|
gcc \
|
|
|
|
|
libnl-3-dev \
|
|
|
|
|
libnl-genl-3-dev \
|
|
|
|
|
libssl-dev \
|
|
|
|
|
make \
|
|
|
|
|
pkg-config \
|
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
|
2016-01-17 11:12:04 +00:00
|
|
|
|
ADD environment /container/environment/99-default
|