You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
708 B
20 lines
708 B
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 \
|
|
&& 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 \
|
|
&& rm -rf /var/cache/apk/* \
|
|
&& usermod -aG ping rootless \
|
|
&& echo "0 1 * * * run-parts /app/syncimages.py" >> /etc/crontabs/root
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN chown -R rootless:rootless /app
|
|
|
|
USER rootless
|
|
|