File tree Expand file tree Collapse file tree
app/src/lib/core/templates Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,20 @@ const renderDockerfilePrelude = (): string =>
88ENV DEBIAN_FRONTEND=noninteractive
99ENV NVM_DIR=/usr/local/nvm
1010
11- RUN apt-get update && apt-get install -y --no-install-recommends \
11+ RUN set -eu; \
12+ for attempt in 1 2 3 4 5; do \
13+ rm -rf /var/lib/apt/lists/*; \
14+ if apt-get -o Acquire::Retries=3 update; then \
15+ break; \
16+ fi; \
17+ if [ "$attempt" = "5" ]; then \
18+ echo "apt-get update failed after retries" >&2; \
19+ exit 1; \
20+ fi; \
21+ echo "apt-get update attempt \${attempt} failed; retrying..." >&2; \
22+ sleep $((attempt * 2)); \
23+ done; \
24+ apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
1225 openssh-server git gh ca-certificates curl unzip bsdutils sudo \
1326 make docker.io docker-compose-v2 bash-completion zsh zsh-autosuggestions xauth \
1427 ncurses-term \
Original file line number Diff line number Diff line change @@ -7,7 +7,20 @@ const renderDockerfilePrelude = (): string =>
77ENV DEBIAN_FRONTEND=noninteractive
88ENV NVM_DIR=/usr/local/nvm
99
10- RUN apt-get update && apt-get install -y --no-install-recommends \
10+ RUN set -eu; \
11+ for attempt in 1 2 3 4 5; do \
12+ rm -rf /var/lib/apt/lists/*; \
13+ if apt-get -o Acquire::Retries=3 update; then \
14+ break; \
15+ fi; \
16+ if [ "$attempt" = "5" ]; then \
17+ echo "apt-get update failed after retries" >&2; \
18+ exit 1; \
19+ fi; \
20+ echo "apt-get update attempt \${attempt} failed; retrying..." >&2; \
21+ sleep $((attempt * 2)); \
22+ done; \
23+ apt-get -o Acquire::Retries=3 install -y --no-install-recommends \
1124 openssh-server git gh ca-certificates curl unzip bsdutils sudo \
1225 make docker.io docker-compose-v2 bash-completion zsh zsh-autosuggestions xauth \
1326 ncurses-term \
You can’t perform that action at this time.
0 commit comments