docker-keepalived-k8s/Dockerfile

19 lines
462 B
Docker
Raw Normal View History

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
COPY check_apiserver.sh /etc/keepalived/check_apiserver.sh
COPY init.sh /
RUN chmod +x /init.sh && chmod +x /etc/keepalived/check_apiserver.sh
CMD ["/init.sh"]