diff --git a/src/components/microservices/code-queue/Dockerfile b/src/components/microservices/code-queue/Dockerfile index 7ac142c7..29aa817c 100644 --- a/src/components/microservices/code-queue/Dockerfile +++ b/src/components/microservices/code-queue/Dockerfile @@ -7,7 +7,7 @@ ENV RUSTUP_HOME=/usr/local/rustup ENV CARGO_HOME=/usr/local/cargo ENV PATH=/usr/local/cargo/bin:${PATH} -RUN (command -v codex >/dev/null 2>&1 && command -v opencode >/dev/null 2>&1 && command -v docker >/dev/null 2>&1 && command -v gh >/dev/null 2>&1 && command -v rg >/dev/null 2>&1 && command -v cargo >/dev/null 2>&1 && command -v rustc >/dev/null 2>&1 && command -v rustfmt >/dev/null 2>&1 && command -v xvfb-run >/dev/null 2>&1 && test -x "$PLAYWRIGHT_BROWSERS_PATH/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell") \ +RUN (command -v codex >/dev/null 2>&1 && command -v opencode >/dev/null 2>&1 && command -v docker >/dev/null 2>&1 && docker buildx version >/dev/null 2>&1 && command -v gh >/dev/null 2>&1 && command -v rg >/dev/null 2>&1 && command -v cargo >/dev/null 2>&1 && command -v rustc >/dev/null 2>&1 && command -v rustfmt >/dev/null 2>&1 && command -v xvfb-run >/dev/null 2>&1 && test -x "$PLAYWRIGHT_BROWSERS_PATH/chromium_headless_shell-1217/chrome-headless-shell-linux64/chrome-headless-shell") \ || (apt-get update \ && apt-get install -y --no-install-recommends \ bash \ @@ -60,11 +60,12 @@ RUN command -v xauth >/dev/null 2>&1 \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*) -RUN rustc --version | awk '{ split($2, v, "."); exit ! (v[1] > 1 || (v[1] == 1 && v[2] >= 86)) }' \ +RUN (command -v rustc >/dev/null 2>&1 && rustc --version | awk '{ split($2, v, "."); exit ! (v[1] > 1 || (v[1] == 1 && v[2] >= 86)) }' && command -v rustfmt >/dev/null 2>&1) \ || (apt-get update \ - && apt-get install -y --no-install-recommends ca-certificates curl \ - && env -u HTTP_PROXY -u HTTPS_PROXY -u http_proxy -u https_proxy bash -lc 'set -e; if ! command -v rustup >/dev/null 2>&1; then curl https://sh.rustup.rs -sSf | sh -s -- -y --profile minimal --default-toolchain stable; fi; rustup default stable; rustup component add rustfmt; hash -r 2>/dev/null || true' \ + && apt-get install -y --no-install-recommends ca-certificates curl rustup \ + && env -u HTTP_PROXY -u HTTPS_PROXY -u http_proxy -u https_proxy bash -lc 'set -e; for attempt in 1 2 3; do rustup toolchain install stable --profile minimal && break; if [ "$attempt" = "3" ]; then exit 1; fi; echo "rustup_toolchain_retry=$attempt" >&2; sleep $((attempt * 15)); done; rustup default stable; for attempt in 1 2 3; do rustup component add rustfmt && break; if [ "$attempt" = "3" ]; then exit 1; fi; echo "rustup_rustfmt_retry=$attempt" >&2; sleep $((attempt * 15)); done; hash -r 2>/dev/null || true' \ && rustc --version | awk '{ split($2, v, "."); exit ! (v[1] > 1 || (v[1] == 1 && v[2] >= 86)) }' \ + && rustfmt --version >/dev/null \ && apt-get clean \ && rm -rf /var/lib/apt/lists/*)