Skip to content

Commit ed58706

Browse files
committed
chore(cli): trim base image comments to the constraints
1 parent c3b4954 commit ed58706

1 file changed

Lines changed: 6 additions & 10 deletions

File tree

packages/cli-v3/src/deploy/buildImage.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -687,9 +687,7 @@ export type GenerateContainerfileOptions = {
687687
entrypoint: string;
688688
};
689689

690-
// Prebuilt in base-images/ with the default system packages included, so the
691-
// package layer is one blob shared by every project instead of an apt install
692-
// per build. Both maps must be bumped together from the same publish run.
690+
// Prebuilt in base-images/; both maps must be bumped together, from one publish run
693691
const BASE_IMAGE: Record<BuildRuntime, string> = {
694692
bun: "triggerdotdev/bun:1.3-node20-bookworm@sha256:61d0f681429e69a0eb0eb054c6dbbc5876012feebabf012dd9b80e2f3f776771",
695693
node: "triggerdotdev/node:21-bookworm@sha256:2580fbfa9a1f75d53126d98bb4bbafabaf3db6b7c1b7996b6603dbea0efcd88c",
@@ -729,10 +727,9 @@ export async function generateContainerfile(options: GenerateContainerfileOption
729727
}
730728
}
731729

732-
// Instructions can leave dpkg in a broken state (e.g. dpkg -i of a local
733-
// .deb), and apt-get install refuses to run on one, so repair first whenever
734-
// instructions preceded. --allow-downgrades: a user pin of a preinstalled
735-
// package (e.g. openssl=<older>) is a downgrade by the time this runs.
730+
// repair: apt-get install refuses to run on dpkg state an instruction left
731+
// broken (the dpkg -i pattern). --allow-downgrades: a user pin of a
732+
// preinstalled package is a downgrade by the time this runs.
736733
function aptInstall(packages: string[], { repair }: { repair: boolean }): string {
737734
const repairStep = repair
738735
? `apt-get --fix-broken install -y --no-install-recommends && \\
@@ -782,9 +779,8 @@ const parseGenerateOptions = (options: GenerateContainerfileOptions) => {
782779
.filter(Boolean)
783780
.join("\n\n");
784781

785-
// Projects with instructions build FROM base so instructions run exactly
786-
// once (their downloads are unbounded); package-only projects keep the
787-
// prebuilt toolchain image and repeat the small package install
782+
// Instructions run once (FROM base) since their downloads are unbounded;
783+
// package-only projects keep the prebuilt toolchain and repeat the small install
788784
const buildStage = baseInstructions
789785
? `FROM base AS build
790786

0 commit comments

Comments
 (0)