Sign inSign up

mycir/tools

By mycir

•Updated over 4 years ago

Image
0

150

mycir/tools repository overview

⁠已安装mysql客户端,可用作定时备份mysql数据库或其它用途。将mysqldump命令写进run.sh中,再映射到容器中/run.sh,最后再挂载容器中的/data目录作为数据库备份的输出目录;

FROM alpine:3.15.4

ENV TZ Asia/Shanghai 
ENV KUBE_VERSION=v1.24.0

RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories && \
    apk add --update --no-cache  mysql-client net-tools tcpdump busybox-extras curl wget tzdata bash && \
    rm -rf /var/cache/apk/*

RUN wget -q "https://storage.googleapis.com/kubernetes-release/release/${KUBE_VERSION}/bin/linux/amd64/kubectl" -O /usr/local/bin/kubectl && \
         chmod +x /usr/local/bin/kubectl

RUN cp /usr/share/zoneinfo/${TZ} /etc/localtime \
    && echo ${TZ} > /etc/timezone && \
    mkdir /data

COPY run.sh / 
RUN chmod +x /run.sh

WORKDIR /data

CMD ["/bin/bash","/run.sh"]

Tag summary

Content type

Image

Digest

Size

28.3 MB

Last updated

over 4 years ago

docker pull mycir/tools