mirror of
https://github.com/OpenListTeam/OpenList.git
synced 2025-11-25 03:15:19 +08:00
fix(docker): Fix the runsvdir permission issue caused by su-exec user switching and resolve the RUN_ARIA2 variable compatibility problem. (#805)
This commit is contained in:
@@ -20,24 +20,24 @@ RUN apk update && \
|
||||
sed -i 's|/root/.aria2|/opt/aria2/.aria2|g' /opt/aria2/.aria2/script.conf && \
|
||||
sed -i 's|/root|/opt/aria2|g' /opt/aria2/.aria2/aria2.conf && \
|
||||
sed -i 's|/root|/opt/aria2|g' /opt/aria2/.aria2/script.conf && \
|
||||
mkdir -p /opt/service/aria2/log && \
|
||||
echo '#!/bin/sh' > /opt/service/aria2/run && \
|
||||
echo 'exec 2>&1' >> /opt/service/aria2/run && \
|
||||
echo 'exec aria2c --enable-rpc --rpc-allow-origin-all --conf-path=/opt/aria2/.aria2/aria2.conf' >> /opt/service/aria2/run && \
|
||||
echo '#!/bin/sh' > /opt/service/aria2/log/run && \
|
||||
echo 'mkdir -p /opt/openlist/data/log/aria2 2>/dev/null' >> /opt/service/aria2/log/run && \
|
||||
echo 'exec svlogd /opt/openlist/data/log/aria2' >> /opt/service/aria2/log/run && \
|
||||
chmod +x /opt/service/aria2/run /opt/service/aria2/log/run && \
|
||||
mkdir -p /opt/service/stop/aria2/log && \
|
||||
echo '#!/bin/sh' > /opt/service/stop/aria2/run && \
|
||||
echo 'exec 2>&1' >> /opt/service/stop/aria2/run && \
|
||||
echo 'exec aria2c --enable-rpc --rpc-allow-origin-all --conf-path=/opt/aria2/.aria2/aria2.conf' >> /opt/service/stop/aria2/run && \
|
||||
echo '#!/bin/sh' > /opt/service/stop/aria2/log/run && \
|
||||
echo 'mkdir -p /opt/openlist/data/log/aria2 2>/dev/null' >> /opt/service/stop/aria2/log/run && \
|
||||
echo 'exec svlogd /opt/openlist/data/log/aria2' >> /opt/service/stop/aria2/log/run && \
|
||||
chmod +x /opt/service/stop/aria2/run /opt/service/stop/aria2/log/run && \
|
||||
touch /opt/aria2/.aria2/aria2.session && \
|
||||
/opt/aria2/.aria2/tracker.sh ; \
|
||||
rm -rf /var/cache/apk/*
|
||||
|
||||
RUN mkdir -p /opt/service/openlist && \
|
||||
echo '#!/bin/sh' > /opt/service/openlist/run && \
|
||||
echo 'exec 2>&1' >> /opt/service/openlist/run && \
|
||||
echo 'cd /opt/openlist' >> /opt/service/openlist/run && \
|
||||
echo 'exec ./openlist server --no-prefix' >> /opt/service/openlist/run && \
|
||||
chmod +x /opt/service/openlist/run
|
||||
RUN mkdir -p /opt/service/start/openlist && \
|
||||
echo '#!/bin/sh' > /opt/service/start/openlist/run && \
|
||||
echo 'exec 2>&1' >> /opt/service/start/openlist/run && \
|
||||
echo 'cd /opt/openlist' >> /opt/service/start/openlist/run && \
|
||||
echo 'exec ./openlist server --no-prefix' >> /opt/service/start/openlist/run && \
|
||||
chmod +x /opt/service/start/openlist/run
|
||||
|
||||
COPY --chmod=755 /build/${TARGETPLATFORM}/openlist ./
|
||||
COPY --chmod=755 entrypoint.sh /entrypoint.sh
|
||||
|
||||
Reference in New Issue
Block a user