-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathDockerfile
More file actions
53 lines (36 loc) · 1.34 KB
/
Dockerfile
File metadata and controls
53 lines (36 loc) · 1.34 KB
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
44
45
46
47
48
49
50
51
52
53
FROM nineaiyu/xadmin-server-base:20251224_141354 AS stage-build
ARG VERSION
WORKDIR /data/xadmin-server
COPY . .
RUN echo > config.yml \
&& \
if [ -n "${VERSION}" ]; then \
sed -i "s@VERSION = .*@VERSION = '${VERSION}'@g" server/const.py; \
fi
FROM python:3.13.3-slim
ENV LANG=en_US.UTF-8 \
PATH=/data/py3/bin:$PATH
ARG APT_MIRROR=http://deb.debian.org
ARG DEPENDENCIES=" \
gettext \
curl \
libmariadb-dev"
RUN set -ex \
&& sed -i "s@http://.*.debian.org@${APT_MIRROR}@g" /etc/apt/sources.list.d/debian.sources \
&& ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime \
&& apt-get update > /dev/null \
&& apt-get -y install --no-install-recommends ${DEPENDENCIES} \
&& echo "no" | dpkg-reconfigure dash \
&& apt-get clean all \
&& rm -rf /var/lib/apt/lists/*
COPY --from=stage-build /data /data
COPY --from=stage-build /usr/local/bin /usr/local/bin
#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
WORKDIR /data/xadmin-server
VOLUME /data/xadmin-server/data
#USER 1001
ENTRYPOINT ["/bin/bash", "entrypoint.sh"]
EXPOSE 8896
STOPSIGNAL SIGQUIT
CMD ["start", "all"]