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.
22 lines
742 B
22 lines
742 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 "#!/bin/sh \n\
|
|
python syncimages.py " >> /etc/periodic/daily/sync-images \
|
|
&& chmod +x /etc/periodic/daily/sync-images
|
|
|
|
WORKDIR /app
|
|
|
|
COPY . .
|
|
|
|
RUN chown -R rootless:rootless /app
|
|
|
|
USER rootless
|
|
|