2022-01-01 18:05:53 +00:00
|
|
|
FROM alpine:latest
|
|
|
|
|
|
|
|
RUN apk add --no-cache \
|
|
|
|
bash \
|
|
|
|
curl \
|
|
|
|
ipvsadm \
|
|
|
|
iproute2 \
|
|
|
|
keepalived \
|
|
|
|
&& addgroup -S keepalived_script \
|
|
|
|
&& adduser -S -s /sbin/nologin -G keepalived_script -H keepalived_script
|
|
|
|
|
|
|
|
COPY keepalived.conf /etc/keepalived/keepalived.conf
|
2022-01-02 11:52:37 +00:00
|
|
|
COPY check_apiserver.sh /etc/keepalived/check_apiserver.sh
|
2022-01-01 18:05:53 +00:00
|
|
|
COPY init.sh /
|
2022-01-02 11:52:37 +00:00
|
|
|
|
|
|
|
RUN chmod +x /init.sh && chmod +x /etc/keepalived/check_apiserver.sh
|
|
|
|
|
2022-01-01 18:05:53 +00:00
|
|
|
CMD ["/init.sh"]
|