Skip to content

Commit

Permalink
feat: custom software sources
Browse files Browse the repository at this point in the history
  • Loading branch information
DDSRem committed Feb 11, 2023
1 parent 1561246 commit 51ed2c8
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 3 deletions.
2 changes: 2 additions & 0 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ENV LANG="C.UTF-8" \
NASTOOL_VERSION=master \
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 \
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.beta
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ ENV LANG="C.UTF-8" \
NASTOOL_VERSION=dev \
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 \
Expand Down
2 changes: 2 additions & 0 deletions docker/Dockerfile.lite
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ ENV LANG="C.UTF-8" \
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 \
Expand Down
6 changes: 3 additions & 3 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ if [ "${NASTOOL_AUTO_UPDATE}" = "true" ]; then
if [ "${hash_old}" != "${hash_new}" ]; then
echo "检测到requirements.txt有变化,重新安装依赖..."
if [ "${NASTOOL_CN_UPDATE}" = "true" ]; then
pip install --upgrade pip setuptools wheel -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install -r requirements.txt -i https://pypi.tuna.tsinghua.edu.cn/simple
pip install --upgrade pip setuptools wheel -i "${PYPI_MIRROR}"
pip install -r requirements.txt -i "${PYPI_MIRROR}"
else
pip install --upgrade pip setuptools wheel
pip install -r requirements.txt
Expand Down Expand Up @@ -64,7 +64,7 @@ if [ "${NASTOOL_AUTO_UPDATE}" = "true" ]; then
if [ "${hash_old}" != "${hash_new}" ]; then
echo "检测到package_list.txt有变化,更新软件包..."
if [ "${NASTOOL_CN_UPDATE}" = "true" ]; then
sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories
sed -i "s/dl-cdn.alpinelinux.org/${ALPINE_MIRROR}/g" /etc/apk/repositories
apk update -f
fi
apk add --no-cache libffi-dev
Expand Down

0 comments on commit 51ed2c8

Please sign in to comment.