@@ -32,14 +32,14 @@ RUN dotnet tool install csharpier --tool-path ${DOTNET_TOOLS_PATH} && \
3232 rm -rf /tmp/* ~/.nuget
3333
3434# Python - ruff handles format+lint, removed redundant black
35- RUN apt-get install -y python3 python3-pip && \
35+ RUN apt-get update && apt-get install -y python3 python3-pip && \
3636 apt-get clean && rm -rf /var/lib/apt/lists/* && \
3737 pip3 install --break-system-packages ruff mypy pylint && \
3838 find /usr -name "*.pyc" -delete && \
3939 find /usr -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
4040
4141# JavaScript/TypeScript - works on both
42- RUN apt-get install -y nodejs curl && \
42+ RUN apt-get update && apt-get install -y nodejs curl && \
4343 apt-get clean && rm -rf /var/lib/apt/lists/*
4444ENV PNPM_HOME="/usr/local/pnpm"
4545ENV SHELL="sh"
@@ -50,7 +50,7 @@ RUN curl -fsSL https://get.pnpm.io/install.sh | ENV="$HOME/.bashrc" sh - && \
5050 rm -rf /tmp/* ~/.npm ~/.cache
5151
5252# Rust - minimal profile (saves ~800MB vs default)
53- RUN apt-get install -y curl gcc && \
53+ RUN apt-get update && apt-get install -y curl gcc && \
5454 apt-get clean && rm -rf /var/lib/apt/lists/*
5555ENV RUSTUP_HOME=/usr/local/rustup \
5656 CARGO_HOME=/usr/local/cargo \
@@ -60,7 +60,7 @@ RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --de
6060 rm -rf /usr/local/cargo/registry /usr/local/cargo/git /tmp/*
6161
6262# Go - native multi-arch support
63- RUN apt-get install -y golang && \
63+ RUN apt-get update && apt-get install -y golang && \
6464 apt-get clean && rm -rf /var/lib/apt/lists/*
6565ENV GOPATH=/usr/local/go-tools \
6666 PATH=/usr/local/go-tools/bin:$PATH
@@ -70,7 +70,7 @@ RUN go install golang.org/x/tools/cmd/goimports@latest && \
7070 rm -rf /tmp/* ~/.cache
7171
7272# Java - OpenJDK + formatters (Trixie ships with 21/23, 17 only headless)
73- RUN apt-get install -y openjdk-21-jdk maven && \
73+ RUN apt-get update && apt-get install -y openjdk-21-jdk maven && \
7474 apt-get clean && rm -rf /var/lib/apt/lists/* && \
7575 mkdir -p /usr/local/java-tools && \
7676 wget https://github.com/google/google-java-format/releases/download/v1.22.0/google-java-format-1.22.0-all-deps.jar \
@@ -82,11 +82,11 @@ RUN apt-get install -y openjdk-21-jdk maven && \
8282 rm -rf /tmp/* ~/.m2/repository
8383
8484# C/C++ - LLVM/Clang tools
85- RUN apt-get install -y clang-format clang-tidy && \
85+ RUN apt-get update && apt-get install -y clang-format clang-tidy && \
8686 apt-get clean && rm -rf /var/lib/apt/lists/*
8787
8888# Shell - shfmt + shellcheck
89- RUN apt-get install -y shellcheck && \
89+ RUN apt-get update && apt-get install -y shellcheck && \
9090 apt-get clean && rm -rf /var/lib/apt/lists/* && \
9191 go install mvdan.cc/sh/v3/cmd/shfmt@latest && \
9292 go clean -cache -modcache && \
@@ -98,7 +98,7 @@ RUN pip3 install --break-system-packages --ignore-installed sqlfluff && \
9898 find /usr -name "__pycache__" -exec rm -rf {} + 2>/dev/null || true
9999
100100# PHP - composer-based tools
101- RUN apt-get install -y php php-xml php-mbstring php-curl unzip && \
101+ RUN apt-get update && apt-get install -y php php-xml php-mbstring php-curl unzip && \
102102 apt-get clean && rm -rf /var/lib/apt/lists/* && \
103103 curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer && \
104104 rm -rf /tmp/*
@@ -120,7 +120,7 @@ RUN wget https://github.com/pinterest/ktlint/releases/download/1.1.1/ktlint -O /
120120
121121# Swift - only for arm64/amd64 Linux (limited support, may fail on some platforms)
122122RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "amd64" ]; then \
123- (apt-get install -y binutils git gnupg2 libc6-dev libcurl4-openssl-dev \
123+ (apt-get update && apt-get install -y binutils git gnupg2 libc6-dev libcurl4-openssl-dev \
124124 libedit2 libgcc-s1 libpython3-dev libsqlite3-0 libstdc++6 libxml2-dev \
125125 libz3-dev pkg-config tzdata zlib1g-dev && \
126126 apt-get clean && rm -rf /var/lib/apt/lists/* && \
@@ -133,7 +133,7 @@ RUN if [ "$TARGETARCH" = "arm64" ] || [ "$TARGETARCH" = "amd64" ]; then \
133133 fi
134134
135135# Ruby - rbenv + rubocop
136- RUN apt-get install -y ruby ruby-dev && \
136+ RUN apt-get update && apt-get install -y ruby ruby-dev && \
137137 apt-get clean && rm -rf /var/lib/apt/lists/* && \
138138 gem install rubocop && \
139139 rm -rf /tmp/* ~/.gem
0 commit comments