new baseimage
This commit is contained in:
parent
9d69f3eb7a
commit
345188086e
|
@ -1,5 +1,8 @@
|
|||
# Changelog
|
||||
|
||||
## 0.1.4
|
||||
- Use light-baseimage
|
||||
|
||||
## 0.1.3
|
||||
- Fix libnl dependency
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -1,5 +1,5 @@
|
|||
NAME = osixia/keepalived
|
||||
VERSION = 0.1.3
|
||||
VERSION = 0.1.4
|
||||
|
||||
.PHONY: all build test tag_latest release
|
||||
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
FROM osixia/baseimage:0.10.4
|
||||
FROM osixia/light-baseimage:0.1.0
|
||||
MAINTAINER Bertrand Gouny <bertrand.gouny@osixia.net>
|
||||
|
||||
# Keepalived version
|
||||
ENV KEEPALIVED_VERSION 1.2.19
|
||||
|
||||
# Use baseimage-docker's init system.
|
||||
CMD ["/sbin/my_init"]
|
||||
CMD ["/osixia/tool/run"]
|
||||
|
||||
# Install Keepalived
|
||||
RUN apt-get -y update \
|
||||
&& LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y \
|
||||
make gcc pkg-config libssl-dev libnl-dev \
|
||||
curl make gcc pkg-config libssl-dev libnl-3-dev libnl-genl-3-dev \
|
||||
&& 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 \
|
||||
|
@ -18,18 +18,16 @@ RUN apt-get -y update \
|
|||
&& ./configure --with-kernel-dir=/lib/modules/$(uname -r)/build \
|
||||
&& make && make install \
|
||||
&& cd - && mkdir -p /etc/keepalived \
|
||||
&& apt-get remove -y --purge --auto-remove make gcc pkg-config libssl-dev
|
||||
&& apt-get remove -y --purge --auto-remove curl make gcc pkg-config libssl-dev
|
||||
|
||||
# Add Keepalived assets
|
||||
ADD service/keepalived/assets /osixia/keepalived
|
||||
# Add service directory to /osixia/service
|
||||
ADD service /osixia/service
|
||||
|
||||
# Clean all
|
||||
RUN rm keepalived.tar.gz \
|
||||
# Use baseimage install-service script and clean all
|
||||
RUN ./sbin/install-service \
|
||||
&& rm -f keepalived.tar.gz && rm -rf /osixia/keepalived-sources \
|
||||
&& apt-get clean && rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/*
|
||||
|
||||
# Add default env variables
|
||||
ADD env.yml /etc/env.yml
|
||||
|
||||
# Add Keepalived container start config & daemon
|
||||
ADD service/keepalived/container-start.sh /etc/my_init.d/keepalived
|
||||
ADD service/keepalived/daemon.sh /etc/service/keepalived/run
|
||||
|
|
|
@ -13,4 +13,4 @@ KEEPALIVED_VIRTUAL_IPS:
|
|||
- 192.168.1.231
|
||||
- 192.168.1.232
|
||||
|
||||
KEEPALIVED_NOTIFY: /osixia/keepalived/notify.sh
|
||||
KEEPALIVED_NOTIFY: /osixia/service/keepalived/assets/notify.sh
|
||||
|
|
|
@ -8,12 +8,12 @@ if [ ! -e "$FIRST_START_DONE" ]; then
|
|||
# config folder is empty use bootstrap config if available
|
||||
if [ ! -e /etc/keepalived/keepalived.conf ]; then
|
||||
echo "No keepalived.conf provided using image default one"
|
||||
if [ ! -e /osixia/keepalived/keepalived.conf ]; then
|
||||
echo "Error: No default keepalived.conf found in /osixia/keepalived/keepalived.conf"
|
||||
if [ ! -e /osixia/service/keepalived/assets/keepalived.conf ]; then
|
||||
echo "Error: No default keepalived.conf found in /osixia/service/keepalived/assets/keepalived.conf"
|
||||
exit 1
|
||||
else
|
||||
|
||||
ln -s /osixia/keepalived/keepalived.conf /etc/keepalived/keepalived.conf
|
||||
ln -s /osixia/service/keepalived/assets/keepalived.conf /etc/keepalived/keepalived.conf
|
||||
|
||||
#
|
||||
# bootstrap config
|
||||
|
|
Loading…
Reference in New Issue