FROM docker:20-dind-rootless USER root RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.tuna.tsinghua.edu.cn/g' /etc/apk/repositories \ && apk add --no-cache python3 py3-pip shadow su-exec \ && ln -sf python3 /usr/bin/python \ && python3 -m ensurepip \ && pip3 install --no-cache --upgrade pip setuptools -i https://pypi.tuna.tsinghua.edu.cn/simple \ && pip install --no-cache kubernetes requests docker -i https://pypi.tuna.tsinghua.edu.cn/simple \ && usermod -aG ping rootless \ && echo $'#!/bin/sh \n\ python /app/syncimages.py' >> /etc/periodic/daily/sync-images \ && chmod +x /etc/periodic/daily/sync-images \ && apk add tzdata && cp /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \ && echo "Asia/Shanghai" > /etc/timezone \ && apk del tzdata shadow \ && rm -rf /var/cache/apk/* WORKDIR /app COPY . . RUN chown -R rootless /app ENTRYPOINT ["./entrypoint.sh"]