-
Notifications
You must be signed in to change notification settings - Fork 50
/
Copy pathDockerfile-dev
43 lines (32 loc) · 1.42 KB
/
Dockerfile-dev
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
FROM registry.cn-beijing.aliyuncs.com/nineaiyu/python:3.13.1-slim
# add pip cn mirrors
ARG PIP_MIRROR=https://pypi.tuna.tsinghua.edu.cn/simple
ARG APT_MIRROR=http://mirrors.tuna.tsinghua.edu.cn
# Install APT dependencies
ARG DEPENDENCIES=" \
curl \
g++ \
make \
pkg-config \
libmariadb-dev \
gettext"
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked,id=core \
--mount=type=cache,target=/var/lib/apt,sharing=locked,id=core \
set -ex \
&& rm -f /etc/apt/apt.conf.d/docker-clean \
&& echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache \
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list.d/debian.sources \
&& apt-get update > /dev/null \
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash
# install pip
RUN --mount=type=cache,target=/root/.cache,id=core \
--mount=type=bind,source=requirements.txt,target=requirements.txt \
set -ex \
&& pip install -U setuptools pip --ignore-installed -i ${PIP_MIRROR} \
&& pip install --no-cache-dir -r requirements.txt -i ${PIP_MIRROR}
WORKDIR /data/xadmin-server/
ENTRYPOINT ["/bin/bash", "entrypoint.sh"]
EXPOSE 8896
STOPSIGNAL SIGQUIT
CMD ["start", "all"]