2016-01-17 11:12:04 +00:00
|
|
|
|
# Use osixia/light-baseimage
|
|
|
|
|
# sources: https://github.com/osixia/docker-light-baseimage
|
2016-11-21 09:27:23 +00:00
|
|
|
|
FROM osixia/light-baseimage:0.2.6
|
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
|
2017-03-20 07:42:37 +00:00
|
|
|
|
ENV KEEPALIVED_VERSION 1.3.5
|
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 \
|
2017-02-19 19:59:03 +00:00
|
|
|
|
iptables-dev \
|
|
|
|
|
libipset-dev \
|
2016-01-17 11:12:04 +00:00
|
|
|
|
libnl-3-dev \
|
|
|
|
|
libnl-genl-3-dev \
|
2016-11-21 09:33:49 +00:00
|
|
|
|
libnl-route-3-dev \
|
2016-11-21 09:35:11 +00:00
|
|
|
|
libnfnetlink-dev \
|
2016-01-17 11:12:04 +00:00
|
|
|
|
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 \
|
2016-11-21 09:39:19 +00:00
|
|
|
|
&& apt-get remove -y --purge --auto-remove curl make gcc pkg-config \
|
2016-02-18 10:18:54 +00:00
|
|
|
|
&& 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
|
|
|
|
|
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
|
|
|
|
|
2016-02-18 10:18:54 +00:00
|
|
|
|
# Use baseimage install-service script
|
2015-07-23 10:11:36 +00:00
|
|
|
|
# https://github.com/osixia/docker-light-baseimage/blob/stable/image/tool/install-service
|
2016-02-18 10:18:54 +00:00
|
|
|
|
RUN /container/tool/install-service
|
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
|