forked from fzlzl/nas-tools-Docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path386.lite.Dockerfile
50 lines (50 loc) · 1.7 KB
/
386.lite.Dockerfile
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
FROM alpine
RUN apk add --no-cache libffi-dev \
git \
gcc \
g++ \
nodejs \
musl-dev \
python3-dev \
py3-pip \
libxml2-dev \
libxslt-dev \
tzdata \
su-exec \
dumb-init \
npm \
&& ln -sf /usr/share/zoneinfo/${TZ} /etc/localtime \
&& echo "${TZ}" > /etc/timezone \
&& ln -sf /usr/bin/python3 /usr/bin/python \
&& pip install --upgrade pip setuptools wheel \
&& pip install cython \
&& pip install -r https://raw.githubusercontent.com/jxxghp/nas-tools/master/requirements.txt \
&& npm install pm2 -g \
&& apk del --purge libffi-dev gcc g++ musl-dev libxml2-dev libxslt-dev \
&& pip uninstall -y cython \
&& rm -rf /tmp/* /root/.cache /var/cache/apk/*
ENV LANG="C.UTF-8" \
TZ="Asia/Shanghai" \
NASTOOL_CONFIG="/config/config.yaml" \
NASTOOL_AUTO_UPDATE=false \
NASTOOL_CN_UPDATE=true \
NASTOOL_VERSION=lite \
PS1="\u@\h:\w \$ " \
REPO_URL="https://github.com/jxxghp/nas-tools.git" \
PYPI_MIRROR="https://pypi.tuna.tsinghua.edu.cn/simple" \
ALPINE_MIRROR="mirrors.ustc.edu.cn" \
PUID=0 \
PGID=0 \
UMASK=000 \
WORKDIR="/nas-tools"
WORKDIR ${WORKDIR}
RUN python_ver=$(python3 -V | awk '{print $2}') \
&& echo "${WORKDIR}/" > /usr/lib/python${python_ver%.*}/site-packages/nas-tools.pth \
&& echo 'fs.inotify.max_user_watches=524288' >> /etc/sysctl.conf \
&& echo 'fs.inotify.max_user_instances=524288' >> /etc/sysctl.conf \
&& git config --global pull.ff only \
&& git clone -b master ${REPO_URL} ${WORKDIR} --depth=1 --recurse-submodule \
&& git config --global --add safe.directory ${WORKDIR}
EXPOSE 3000
VOLUME ["/config"]
ENTRYPOINT ["/nas-tools/docker/entrypoint.sh"]