2016-01-17 11:12:04 +00:00
|
|
|
|
# Use osixia/light-baseimage
|
|
|
|
|
# sources: https://github.com/osixia/docker-light-baseimage
|
2017-10-06 08:47:50 +00:00
|
|
|
|
FROM osixia/alpine-light-baseimage:0.1.5
|
2015-06-09 18:41:43 +00:00
|
|
|
|
|
2015-06-16 09:13:22 +00:00
|
|
|
|
# Keepalived version
|
2019-05-29 17:50:04 +00:00
|
|
|
|
ARG KEEPALIVED_VERSION=2.0.16
|
2015-06-15 19:33:06 +00:00
|
|
|
|
|
2016-01-17 11:12:04 +00:00
|
|
|
|
# Download, build and install Keepalived
|
2017-04-02 12:25:09 +00:00
|
|
|
|
RUN apk --no-cache add \
|
2018-11-13 15:00:03 +00:00
|
|
|
|
autoconf \
|
|
|
|
|
curl \
|
|
|
|
|
gcc \
|
|
|
|
|
ipset \
|
|
|
|
|
ipset-dev \
|
|
|
|
|
iptables \
|
|
|
|
|
iptables-dev \
|
|
|
|
|
libnfnetlink \
|
|
|
|
|
libnfnetlink-dev \
|
|
|
|
|
libnl3 \
|
|
|
|
|
libnl3-dev \
|
|
|
|
|
make \
|
|
|
|
|
musl-dev \
|
|
|
|
|
openssl \
|
|
|
|
|
openssl-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 \
|
2017-03-21 10:19:41 +00:00
|
|
|
|
&& ./configure --disable-dynamic-linking \
|
2015-06-16 09:13:22 +00:00
|
|
|
|
&& make && make install \
|
|
|
|
|
&& cd - && mkdir -p /etc/keepalived \
|
2016-02-18 10:18:54 +00:00
|
|
|
|
&& rm -f keepalived.tar.gz \
|
|
|
|
|
&& rm -rf /container/keepalived-sources \
|
2017-04-02 12:25:09 +00:00
|
|
|
|
&& apk --no-cache del \
|
2018-11-13 15:00:03 +00:00
|
|
|
|
autoconf \
|
|
|
|
|
curl \
|
|
|
|
|
gcc \
|
|
|
|
|
ipset-dev \
|
|
|
|
|
iptables-dev \
|
|
|
|
|
libnfnetlink-dev \
|
|
|
|
|
libnl3-dev \
|
|
|
|
|
make \
|
|
|
|
|
musl-dev \
|
|
|
|
|
openssl-dev
|
2017-04-02 12:25:09 +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
|