Skip to content

Commit

Permalink
Merge pull request #182 from AirportR/revert-180-patch-7
Browse files Browse the repository at this point in the history
Revert "fix 修复alpine镜像构建失败"
  • Loading branch information
AirportR authored Mar 8, 2024
2 parents c242d6d + b32fa1b commit 61dad58
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
5 changes: 1 addition & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ ENV startup=1124
ENV speednodes=300
ENV speedthread=4
ENV nospeed=true
ENV SHELL=/bin/bash
ENV LANG C.UTF-8

WORKDIR /app

Expand All @@ -37,12 +35,11 @@ RUN apt-get update && \
/usr/bin/crontab /etc/cron.d/crontab && \
chmod +x /app/docker/update.sh && \
chmod +x /app/docker/docker-entrypoint.sh && \
usermod -s /bin/bash root && \
rm -rf /var/lib/apt/lists/*

COPY --from=compile-image /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=compile-image /opt/venv /opt/venv

ENV PATH="/opt/venv/bin:$PATH"

ENTRYPOINT ["bash", "/app/docker/docker-entrypoint.sh"]
ENTRYPOINT ["/app/docker/docker-entrypoint.sh"]
5 changes: 1 addition & 4 deletions docker/Dockerfile.alpine
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,6 @@ ENV startup=1124
ENV speednodes=300
ENV speedthread=4
ENV nospeed=true
ENV SHELL=/bin/bash
ENV LANG C.UTF-8

WORKDIR /app

Expand All @@ -33,12 +31,11 @@ RUN apk add --no-cache \
chmod +x /app/docker/fulltcore.sh && \
bash /app/docker/fulltcore.sh && \
chmod +x /app/docker/update.sh && \
sed -i 's/ash/bash/g' /etc/passwd && \
chmod +x /app/docker/docker-entrypoint.sh

COPY --from=compile-image /etc/ssl/certs/ca-certificates.crt /etc/ssl/certs/
COPY --from=compile-image /opt/venv /opt/venv

ENV PATH="/opt/venv/bin:$PATH"

ENTRYPOINT ["bash", "/app/docker/docker-entrypoint.sh"]
ENTRYPOINT ["/app/docker/docker-entrypoint.sh"]
11 changes: 1 addition & 10 deletions docker/docker-entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,6 @@ fi

fi

if [ ! -z "${git_proxy}" ]; then
mkdir /root/.ssh
cat > /root/.ssh/config <<EOF
Host github.com
User git
ProxyCommand connect -S ${git_proxy} %h %p
EOF
fi

supervisord -c /etc/supervisord.conf

if [[ -f "/etc/debian_version" ]]; then
Expand All @@ -49,4 +40,4 @@ fi

if [[ -f "/etc/alpine-release" ]]; then
crond -f > /dev/null 2>&1
fi
fi
1 change: 0 additions & 1 deletion docker/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ 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 61dad58

Please sign in to comment.