FROM --platform=arm64 oven/bun:canary
ENV NODE_ENV production
# Install Doppler CLI
RUN apt-get update && apt-get install -y apt-transport-https ca-certificates curl gnupg && \
curl -sLf --retry 3 --tlsv1.2 --proto "=https" 'https://packages.doppler.com/public/cli/gpg.DE2A7741A397C129.key' | gpg --dearmor -o /usr/share/keyrings/doppler-archive-keyring.gpg && \
echo "deb [signed-by=/usr/share/keyrings/doppler-archive-keyring.gpg] https://packages.doppler.com/public/cli/deb/debian any-version main" | tee /etc/apt/sources.list.d/doppler-cli.list && \
apt-get update && \
apt-get -y install doppler
RUN bun i -g typescript
WORKDIR /usr/src/app
COPY package.json .
COPY bun.lockb .
RUN bun install --frozen-lockfile
ADD . /usr/src/app
CMD ["bun", "--smol", "start:doppler"]
When I remove the doppler installation and replace the CMD line with
CMD ["bun", "src/index.ts"]
I get no error message and the container just dies.
What is the expected behavior?
I expect the container to run as it does locally.
I would also expect more descriptive error message when something goes wrong.
Bun is able to execute the files with bun src/index.ts outside the docker container just fine.
What do you see instead?
This is a screenshot of the logs of the container that just dies:
Additional information
The image built and ran just fine on a machine with the following OS:
Linux 5.15.0-83-generic x86_64 x86_64
Side Note on error messages
I had a config error earlier where the progream wasn't finding the redis instance, and I couldn't figure it out based on the bun error message. I had to run the program with node and got a more descriptive error message.
This isn't part of the issue but it would make debugging easier and allow to post more descriptive steps on how to reproduce this issue
What version of Bun is running?
1.0.1+31aec4ebe325982fc0ef27498984b0ad9969162b
What platform is your computer?
Darwin 22.5.0 arm64 arm
What steps can reproduce the bug?
Here is my Dockerfile:
When I remove the doppler installation and replace the CMD line with
I get no error message and the container just dies.
What is the expected behavior?
I expect the container to run as it does locally.
I would also expect more descriptive error message when something goes wrong. Bun is able to execute the files with
bun src/index.ts
outside the docker container just fine.What do you see instead?
This is a screenshot of the logs of the container that just dies:
Additional information
The image built and ran just fine on a machine with the following OS:
Side Note on error messages
I had a config error earlier where the progream wasn't finding the redis instance, and I couldn't figure it out based on the bun error message. I had to run the program with node and got a more descriptive error message.
This isn't part of the issue but it would make debugging easier and allow to post more descriptive steps on how to reproduce this issue