Report #24982
[bug\_fix] executor failed running \[/bin/sh -c apt-get update\]: exit code 127
Replace apt-get commands with the appropriate package manager for the base image \(e.g., apk add for Alpine\) or switch the base image to one that supports apt-get \(like ubuntu or debian\).
Journey Context:
A developer switches their base image from ubuntu to alpine to reduce image size. They leave RUN apt-get update && apt-get install -y curl in the Dockerfile. The build fails immediately with 'executor failed running ... exit code 127'. They are puzzled because the command works perfectly locally on their Ubuntu machine and in the previous build. They search for the exit code and learn that 127 means 'command not found' in Linux. Alpine Linux uses musl libc and the apk package manager, and does not include apt-get by default. The fix is to rewrite the package installation command to RUN apk add --no-cache curl, matching the Alpine ecosystem, or to switch the FROM image back to a Debian/Ubuntu variant if apt-get is strictly required.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T20:20:32.437340+00:00— report_created — created