Skip to content

Commit

Permalink
Merge pull request #194 from aipeach/patch-1
Browse files Browse the repository at this point in the history
fix 修复容器更新同步代码后没有执行权限的问题
  • Loading branch information
AirportR authored Jun 27, 2024
2 parents 0be60ba + 900c5fe commit 5faced9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
7 changes: 5 additions & 2 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM python:3.11.7-alpine3.19 AS compile-image
FROM python:3.11.9-alpine3.20 AS compile-image

RUN apk add --no-cache \
gcc g++ make libffi-dev libstdc++ gcompat libgcc build-base py3-pybind11-dev abseil-cpp-dev re2-dev ca-certificates
Expand All @@ -10,7 +10,7 @@ ADD https://raw.githubusercontent.com/AirportR/FullTclash/backend/requirements.t
RUN pip3 install --no-cache-dir -r requirements.txt && \
pip3 install --no-cache-dir supervisor

FROM python:3.11.7-alpine3.19
FROM python:3.11.9-alpine3.20

ARG GIT_Branch
ENV GIT_Branch=$GIT_Branch
Expand All @@ -19,6 +19,8 @@ ENV bind=0.0.0.0:8765
ENV token=fulltclash
ENV branch=origin
ENV core=4
ENV SHELL=/bin/bash
ENV LANG C.UTF-8

WORKDIR /app

Expand All @@ -33,6 +35,7 @@ RUN apk add --no-cache \
mv /app/docker/fulltclash.conf /etc/supervisord.d/fulltclash.conf && \
chmod +x /app/docker/fulltcore.sh && \
bash /app/docker/fulltcore.sh && \
sed -i 's/ash/bash/g' /etc/passwd && \
chmod +x /app/docker/update.sh && \
chmod +x /app/docker/docker-entrypoint.sh

Expand Down
1 change: 1 addition & 0 deletions docker/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ update() {
git --git-dir='/app/.git' --work-tree='/app' reset --hard origin/$git_branch
git --git-dir='/app/.git' --work-tree='/app' pull
git_version=$(git --git-dir='/app/.git' --work-tree='/app' rev-parse HEAD)
chmod -R 755 /app
}

if [[ $last_version == "$git_version" ]]; then
Expand Down

0 comments on commit 5faced9

Please sign in to comment.