Repository navigation
Closed
Description
Provide environment information
- System:
- OS: macOS 15.0
- CPU: (8) arm64 Apple M3
- Memory: 95.38 MB / 16.00 GB
- Shell: 5.9 - /bin/zsh
- Binaries:
- Node: 20.11.1 - ~/.nvm/versions/node/v20.11.1/bin/node
- npm: 10.2.4 - ~/.nvm/versions/node/v20.11.1/bin/npm
- pnpm: 8.15.5 - ~/.nvm/versions/node/v20.11.1/bin/pnpm
- bun: 1.1.24 - /opt/homebrew/bin/bun
Describe the bug
The audioWaveform extension breaks the package installation (apt-get install) for the following extensions.
Reproduction repo
https://github.com/ThibautCuchet/trigger.dev/tree/issue-audiowaveform
To reproduce
In references/v3-catalog/trigger.config.ts, I added a debug extension after audioWaveform :
audioWaveform(),
{
name: "debug",
onBuildComplete: (ctx) => {
ctx.addLayer({
id: "debug",
image: {
instructions: ["RUN apt-get update", "RUN apt-get install -y curl"],
}
})
}
},Running pnpm exec trigger deploy --profile local --self-hosted, will raise an error during the build of the docker image :
Containerfile:8
--------------------
6 | RUN rm audiowaveform*.deb
7 | RUN apt-get update
8 | >>> RUN apt-get install -y curl
9 |
10 | ENV DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get install -y curl" did not complete successfully: exit code: 100Moving the debug extension before audioWaveform, doens't have this bug :
{
name: "debug",
onBuildComplete: (ctx) => {
ctx.addLayer({
id: "debug",
image: {
instructions: ["RUN apt-get update", "RUN apt-get install -y curl"],
}
})
}
},
audioWaveform(),Additional information
This error breaks the deployment of references/v3-catalog in production because the new puppeteer extension needs to install packages.
| puppeteer(), |
------
Containerfile:7
--------------------
5 | RUN dpkg -i audiowaveform_1.10.1-1-12_amd64.deb || true
6 | RUN rm audiowaveform*.deb
7 | >>> RUN apt-get update && apt-get install curl gnupg -y && curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list' && apt-get update && apt-get install google-chrome-stable -y --no-install-recommends && rm -rf /var/lib/apt/lists/*
8 |
9 | ENV DEBIAN_FRONTEND=noninteractive
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update && apt-get install curl gnupg -y && curl --location --silent https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - && sh -c 'echo \"deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main\" >> /etc/apt/sources.list.d/google.list' && apt-get update && apt-get install google-chrome-stable -y --no-install-recommends && rm -rf /var/lib/apt/lists/*" did not complete successfully: exit code: 100Metadata
Metadata
Assignees
Labels
No labels
Activity
nicktrn commentedon Sep 20, 2024
Yep, order is currently important with the audiowaveform extension as it needs an
apt-get --fix-broken installbefore any other apt calls. Need to figure out a better solution here. Thanks for flagging!ThibautCuchet commentedon Sep 20, 2024
@nicktrn I just open a PR to fix this
nicktrn commentedon Sep 20, 2024
Thanks, we may go with that for now. Ideally, I think we should aggregate all apt steps into one to decrease build time, improve caching, etc. But that's a much more extensive change of course.
ThibautCuchet commentedon Sep 20, 2024
Shouldn’t the pkgs property be used for the dependencies of the instructions and be executed earlier in the Dockerfile? Or alternatively, add a new prop.
trigger.dev/packages/cli-v3/src/deploy/buildImage.ts
Lines 460 to 461 in b999c86
trigger.dev/packages/cli-v3/src/deploy/buildImage.ts
Lines 468 to 471 in b999c86