docker-keepalived/image/Dockerfile

55 lines
1.5 KiB
Docker
Raw Normal View History

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
MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.net>
2015-06-16 09:13:22 +00:00
# Keepalived version
2018-02-28 14:00:23 +00:00
ARG KEEPALIVED_VERSION=1.4.2
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 \
2016-01-17 11:12:04 +00:00
curl \
gcc \
2017-04-02 12:25:09 +00:00
ipset \
ipset-dev \
iptables \
2017-02-19 19:59:03 +00:00
iptables-dev \
2017-04-02 12:25:09 +00:00
libnfnetlink \
2016-11-21 09:35:11 +00:00
libnfnetlink-dev \
2017-04-02 12:25:09 +00:00
libnl3 \
libnl3-dev \
2016-01-17 11:12:04 +00:00
make \
2017-04-02 12:25:09 +00:00
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 \
2017-04-02 17:53:16 +00:00
curl \
2017-04-02 12:25:09 +00:00
gcc \
ipset-dev \
iptables-dev \
libnfnetlink-dev \
libnl3-dev \
make \
musl-dev \
openssl-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
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