diff --git a/aria2/Dockerfile b/aria2/Dockerfile index ead9f90..cb13142 100644 --- a/aria2/Dockerfile +++ b/aria2/Dockerfile @@ -1,12 +1,15 @@ ARG ALPINE_VERSION=latest -FROM lzdk64/alpine:${ALPINE_VERSION}-ustc +FROM alpine:${ALPINE_VERSION} + +ARG APK_MIRROR=dl-cdn.alpinelinux.org ENV APPEND_OPTS="" COPY aria2.run /usr/local/bin/ COPY aria2.conf.template /etc/aria2/ -RUN apk --no-cache --no-progress add aria2 && \ +RUN sed -i "s/dl-cdn.alpinelinux.org/${APK_MIRROR}/g" /etc/apk/repositories && \ + apk --no-cache --no-progress add aria2 && \ mkdir -p /var/aria2 && \ chmod 777 /var/aria2 && \ chmod 777 /etc/aria2 && \ diff --git a/custom.env.example b/custom.env.example index 3b29856..f4e0c51 100644 --- a/custom.env.example +++ b/custom.env.example @@ -8,6 +8,7 @@ TZ=Asia/Shanghai # docker build args +ARGS_APK_MIRROR='mirrors.aliyun.com' ARGS_ALPINE_VERSION=3.16 ARGS_PYTHON_VERSION=3.8 ARGS_NGINX_VERSION=1.22 diff --git a/docker-compose.gen b/docker-compose.gen index 697b970..b96dc45 100755 --- a/docker-compose.gen +++ b/docker-compose.gen @@ -36,7 +36,6 @@ services: - PYTHON_VERSION=${ARGS_PYTHON_VERSION} - ALPINE_VERSION=${ARGS_ALPINE_VERSION} environment: - - TZ=${TZ:-Asia/Shanghai} - NMP_ENDPOINT=${PROXY_NMP_ENDPOINT} - NMP_TOKEN=${PROXY_NMP_TOKEN} networks: @@ -52,8 +51,8 @@ services: context: ./samba args: - ALPINE_VERSION=${ARGS_ALPINE_VERSION} + - APK_MIRROR=${ARGS_APK_MIRROR} environment: - - TZ=${TZ:-Asia/Shanghai} - GID_PRIVATE=${SMB_GID_PRIVATE} - GID_PROTECT=${SMB_GID_PROTECT} - GID_PUBLIC=${SMB_GID_PUBLIC} @@ -81,8 +80,8 @@ services: context: ./wsdd2 args: - ALPINE_VERSION=${ARGS_ALPINE_VERSION} + - APK_MIRROR=${ARGS_APK_MIRROR} environment: - - TZ=${TZ:-Asia/Shanghai} - HOSTNAME=$(hostname) - WORKGROUP=${SMB_WORKGROUP:-WORKGROUP} network_mode: host @@ -94,8 +93,6 @@ services: context: ./nginx args: - NGINX_VERSION=${ARGS_NGINX_VERSION} - environment: - - TZ=${TZ:-Asia/Shanghai} networks: - localnet ports: @@ -111,8 +108,6 @@ services: php-fpm: image: "php:${ARGS_PHP_VERSION}-fpm-alpine${ARGS_ALPINE_VERSION}" - environment: - - TZ=${TZ:-Asia/Shanghai} networks: - localnet volumes: @@ -128,8 +123,6 @@ services: context: ./jellyfin args: - JELLYFIN_VERSION=${ARGS_JELLYFIN_VERSION} - environment: - - TZ=${TZ:-Asia/Shanghai} user: ${MEDIA_UGID} group_add: - "$MEDIA_GID_RENDER"$( \ @@ -157,6 +150,7 @@ services: context: ./motd args: - ALPINE_VERSION=${ARGS_ALPINE_VERSION} + - APK_MIRROR=${ARGS_APK_MIRROR} environment: - TZ=${TZ:-Asia/Shanghai} networks: @@ -176,8 +170,7 @@ $(for CONF in ${ARIA2_CONFS[@]}; do context: ./aria2 args: - ALPINE_VERSION=${ARGS_ALPINE_VERSION} - environment: - - TZ=${TZ:-Asia/Shanghai} + - APK_MIRROR=${ARGS_APK_MIRROR} user: ${SRV_UGID} networks: - localnet diff --git a/motd/Dockerfile b/motd/Dockerfile index 8d00c6d..3e5c6cc 100644 --- a/motd/Dockerfile +++ b/motd/Dockerfile @@ -1,7 +1,10 @@ ARG ALPINE_VERSION=latest -FROM lzdk64/alpine:${ALPINE_VERSION}-ustc +FROM alpine:${ALPINE_VERSION} -RUN apk --no-cache --no-progress add jq curl && \ +ARG APK_MIRROR=dl-cdn.alpinelinux.org + +RUN sed -i "s/dl-cdn.alpinelinux.org/${APK_MIRROR}/g" /etc/apk/repositories && \ + apk --no-cache --no-progress add jq curl && \ rm -rf /tmp/* COPY motd.run /etc/periodic/hourly/ diff --git a/samba/Dockerfile b/samba/Dockerfile index 3059cc5..ab51a71 100644 --- a/samba/Dockerfile +++ b/samba/Dockerfile @@ -1,7 +1,10 @@ ARG ALPINE_VERSION=latest -FROM lzdk64/alpine:${ALPINE_VERSION}-ustc +FROM alpine:${ALPINE_VERSION} -RUN apk --no-cache --no-progress add samba && \ +ARG APK_MIRROR=dl-cdn.alpinelinux.org + +RUN sed -i "s/dl-cdn.alpinelinux.org/${APK_MIRROR}/g" /etc/apk/repositories && \ + apk --no-cache --no-progress add samba && \ rm -rf /tmp/* #mv /etc/samba/smb.conf /etc/samba/smb.conf.bak && \ #mv /tmp/smb.conf /etc/samba/smb.conf && \ diff --git a/wsdd2 b/wsdd2 index d529565..7b37291 160000 --- a/wsdd2 +++ b/wsdd2 @@ -1 +1 @@ -Subproject commit d529565dcc5709f33a9e1b2d14e1f105bd6e14cb +Subproject commit 7b37291da03635ecbcfa1b2f99810e5720180d89