mirror of
https://github.com/halfwaystudent/douyin-sparkflow.git
synced 2026-07-02 21:01:26 +08:00
fix: fix login-desktop 8788 build failure (curl exit 7)
This commit is contained in:
@@ -39,13 +39,13 @@ RUN sed -i 's/archive.ubuntu.com/mirrors.aliyun.com/g' /etc/apt/sources.list \
|
||||
websockify \
|
||||
x11vnc \
|
||||
xfonts-intl-chinese \
|
||||
&& curl -fsSL -x http://127.0.0.1:7890 https://download.docker.com/linux/static/stable/x86_64/docker-25.0.3.tgz -o docker.tgz \
|
||||
&& curl -fsSL ${HTTP_PROXY:+-x "$HTTP_PROXY"} https://download.docker.com/linux/static/stable/x86_64/docker-25.0.3.tgz -o docker.tgz \
|
||||
&& tar xzvf docker.tgz \
|
||||
&& mv docker/docker /usr/bin/docker \
|
||||
&& chmod +x /usr/bin/docker \
|
||||
&& rm -rf docker docker.tgz \
|
||||
&& mkdir -p /usr/local/lib/docker/cli-plugins \
|
||||
&& curl -SL -x http://127.0.0.1:7890 https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose \
|
||||
&& curl -SL ${HTTP_PROXY:+-x "$HTTP_PROXY"} https://github.com/docker/compose/releases/download/v2.24.5/docker-compose-linux-x86_64 -o /usr/local/lib/docker/cli-plugins/docker-compose \
|
||||
&& chmod +x /usr/local/lib/docker/cli-plugins/docker-compose \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
@@ -176,8 +176,27 @@ compose_up() {
|
||||
cd "$APP_ROOT"
|
||||
log "Refreshing proxy configuration"
|
||||
run_root bash "$APP_ROOT/refresh_proxy.sh"
|
||||
log "Building and starting containers"
|
||||
run_root env DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose up -d --build proxy web login-desktop scheduler
|
||||
log "Starting proxy container first"
|
||||
run_root env DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 docker compose up -d proxy
|
||||
log "Waiting for proxy to be reachable on 127.0.0.1:7890"
|
||||
local tries=0
|
||||
while [ "$tries" -lt 30 ]; do
|
||||
if curl -fsS -x http://127.0.0.1:7890 https://www.google.com -o /dev/null 2>/dev/null; then
|
||||
log "Proxy is reachable"
|
||||
break
|
||||
fi
|
||||
tries=$((tries + 1))
|
||||
sleep 2
|
||||
done
|
||||
if [ "$tries" -ge 30 ]; then
|
||||
echo "Proxy did not become reachable on 127.0.0.1:7890; the build may fail downloading docker/compose binaries." >&2
|
||||
fi
|
||||
log "Building and starting remaining containers"
|
||||
run_root env DOCKER_BUILDKIT=1 COMPOSE_DOCKER_CLI_BUILD=1 \
|
||||
HTTP_PROXY_BUILD=http://127.0.0.1:7890 \
|
||||
HTTPS_PROXY_BUILD=http://127.0.0.1:7890 \
|
||||
ALL_PROXY_BUILD=socks5://127.0.0.1:7890 \
|
||||
docker compose up -d --build web login-desktop scheduler
|
||||
}
|
||||
|
||||
print_summary() {
|
||||
|
||||
Reference in New Issue
Block a user