|
|
|
FROM python:3.9-slim |
|
|
|
|
|
ENV TZ=Asia/Shanghai |
|
ENV PATH="/home/user/.local/bin:$PATH" |
|
|
|
|
|
RUN apt-get update && \ |
|
apt-get install --no-install-recommends -y tzdata git && \ |
|
ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime && \ |
|
echo "${TZ}" > /etc/timezone && \ |
|
apt-get clean && rm -rf /var/lib/apt/lists/* |
|
|
|
|
|
RUN git config --global http.postBuffer 524288000 |
|
RUN git config --global user.name "fb" |
|
RUN git config --global user.email "fb@@users.noreply.github.com" |
|
|
|
|
|
RUN useradd -m user |
|
USER user |
|
|
|
|
|
RUN git clone https://github.com/kuanghongjie/FileCodeBox /home/user/app |
|
|
|
|
|
WORKDIR /home/user/app |
|
RUN pip install --no-cache-dir --user -r requirements.txt |
|
|
|
|
|
EXPOSE 12345 |
|
CMD ["python", "main.py"] |
|
|