优化Dockerfile防止更新权限覆盖

This commit is contained in:
david 2020-12-22 01:19:45 +08:00
parent 801d7b016f
commit e10c36295c
3 changed files with 9 additions and 6 deletions

View File

@ -81,7 +81,8 @@ RUN set -ex \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \ && git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \
&& cp /IYUU/config/config.sample.php /IYUU/config/config.php \ && cp /IYUU/config/config.sample.php /IYUU/config/config.php \
&& ln -sf /IYUU/config/config.php /config.php \ && ln -sf /IYUU/config/config.php /config.php \
&& chmod -R 777 /IYUU/docker/entrypoint.sh \ && cp /IYUU/docker/entrypoint.sh /entrypoint.sh \
&& chmod -R 777 /entrypoint.sh \
&& apk del --purge *-dev \ && apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \ && rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \
# ---------- some config,clear work ---------- # ---------- some config,clear work ----------
@ -110,4 +111,4 @@ RUN set -ex \
# EXPOSE 9000 # EXPOSE 9000
# VOLUME ["/IYUU", "/data"] # VOLUME ["/IYUU", "/data"]
WORKDIR /IYUU WORKDIR /IYUU
ENTRYPOINT ["/IYUU/docker/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View File

@ -81,7 +81,8 @@ RUN set -ex \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \ && git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \
&& cp /IYUU/config/config.sample.php /IYUU/config/config.php \ && cp /IYUU/config/config.sample.php /IYUU/config/config.php \
&& ln -sf /IYUU/config/config.php /config.php \ && ln -sf /IYUU/config/config.php /config.php \
&& chmod -R 777 /IYUU/docker/entrypoint.sh \ && cp /IYUU/docker/entrypoint.sh /entrypoint.sh \
&& chmod -R 777 /entrypoint.sh \
&& apk del --purge *-dev \ && apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \ && rm -rf /var/cache/apk/* /tmp/* /usr/share/man /usr/share/php7 \
# ---------- some config,clear work ---------- # ---------- some config,clear work ----------
@ -110,4 +111,4 @@ RUN set -ex \
# EXPOSE 9000 # EXPOSE 9000
# VOLUME ["/IYUU", "/data"] # VOLUME ["/IYUU", "/data"]
WORKDIR /IYUU WORKDIR /IYUU
ENTRYPOINT ["/IYUU/docker/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]

View File

@ -17,7 +17,8 @@ RUN set -ex \
&& git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \ && git clone https://gitee.com/ledc/IYUUAutoReseed.git /IYUU \
&& cp /IYUU/config/config.sample.php /IYUU/config/config.php \ && cp /IYUU/config/config.sample.php /IYUU/config/config.php \
&& ln -sf /IYUU/config/config.php /config.php \ && ln -sf /IYUU/config/config.php /config.php \
&& chmod -R 777 /IYUU/docker/entrypoint.sh \ && cp /IYUU/docker/entrypoint.sh /entrypoint.sh \
&& chmod -R 777 /entrypoint.sh \
&& apk del --purge *-dev \ && apk del --purge *-dev \
&& rm -rf /var/cache/apk/* /tmp/* /usr/share/man \ && rm -rf /var/cache/apk/* /tmp/* /usr/share/man \
&& echo "${TZ}" > /etc/timezone \ && echo "${TZ}" > /etc/timezone \
@ -28,4 +29,4 @@ RUN set -ex \
&& echo -e "\033[42;37m Build Completed :).\033[0m\n" && echo -e "\033[42;37m Build Completed :).\033[0m\n"
WORKDIR /IYUU WORKDIR /IYUU
ENTRYPOINT ["/IYUU/docker/entrypoint.sh"] ENTRYPOINT ["/entrypoint.sh"]