forked from nineaiyu/xadmin-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
22 lines (15 loc) · 887 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
FROM python:3.12.3-slim
# add pip cn mirrors
ARG PIP_MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple
# set apt cn mirrors
RUN sed -i [email protected]@mirrors.tuna.tsinghua.edu.cn@ /etc/apt/sources.list.d/debian.sources
RUN apt update && apt-get install libmariadb-dev g++ pkg-config -y && rm -rf /var/lib/apt/lists/*
# install pip
COPY requirements.txt /opt/requirements.txt
RUN cd /opt/ && pip install -U setuptools pip -i ${PIP_MIRROR} --ignore-installed && pip install --no-cache-dir -r requirements.txt -i ${PIP_MIRROR}
#RUN rm -rf /var/cache/yum/
WORKDIR /data/xadmin-server/
RUN addgroup --system --gid 1001 nginx \
&& adduser --system --disabled-login --ingroup nginx --no-create-home --home /nonexistent --gecos "nginx user" --shell /bin/false --uid 1001 nginx
#ENTRYPOINT ["python", "manage.py", "start", "all","-u","nginx"]
ENTRYPOINT ["/bin/bash", "entrypoint.sh"]