2015-07-16 19:43:36 +00:00
|
|
|
FROM osixia/light-baseimage:0.1.0
|
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-06-09 18:41:43 +00:00
|
|
|
# Use baseimage-docker's init system.
|
2015-07-16 19:43:36 +00:00
|
|
|
CMD ["/osixia/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-16 19:43: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 \
|
|
|
|
&& mkdir -p /osixia/keepalived-sources \
|
|
|
|
&& tar -xzf keepalived.tar.gz --strip 1 -C /osixia/keepalived-sources \
|
|
|
|
&& cd osixia/keepalived-sources \
|
|
|
|
&& ./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-16 19:43:36 +00:00
|
|
|
# Add service directory to /osixia/service
|
|
|
|
ADD service /osixia/service
|
2015-06-09 18:41:43 +00:00
|
|
|
|
2015-06-16 09:13:22 +00:00
|
|
|
# Clean all
|
2015-07-16 19:43:36 +00:00
|
|
|
# Use baseimage install-service script and clean all
|
|
|
|
RUN ./sbin/install-service \
|
|
|
|
&& rm -f keepalived.tar.gz && rm -rf /osixia/keepalived-sources \
|
2015-06-16 09:13:22 +00:00
|
|
|
&& 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
|