#`bun install` hangs inside Docker container

1 messages · Page 1 of 1 (latest)

royal ravine
#

I have a multi-stage Dockerfile, but even with a minimal Dockerfile, bun install hangs indefinely.

ARG DEBIAN_VERSION=bookworm-20230703-slim

FROM --platform=linux/amd64 debian:${DEBIAN_VERSION} as installer
ARG BUN_VERSION=0.6.13

RUN apt-get update && apt-get upgrade
RUN apt-get install unzip 

ADD https://github.com/oven-sh/bun/releases/download/bun-v${BUN_VERSION}/bun-linux-x64.zip bun-linux-x64.zip
RUN unzip bun-linux-x64.zip -d /tmp

RUN cp /tmp/bun-linux-x64/bun /bin/
COPY . .
RUN bun install 

CMD ["bun", "src/index.ts"]
{
  "name": "eureka-money",
  "version": "1.0.44",
  "scripts": {
    "test": "echo \"Error: no test specified\" && exit 1",
    "dev": "bun run --watch src/index.ts | pino-pretty"
  },
  "dependencies": {
    "elysia": "latest"
   },
  "devDependencies": {
    "bun-types": "latest"
  },
  "module": "src/index.js"
}
#

I'll add that removing RUN bun install and setting CMD to ["bun", "--version"] builds and runs correctly.

#

I am also on an M1/arm mac, which could be the issue.

merry wren
#

just about to post about oven/bun:canary image- containers hang and run out of memory

royal ravine
#

oh neat. I didn't know there were official images. Switchign to that actually solved it for me... for now 😅

merry wren
#

lol i'm glad!

royal ravine
#

I'm gonna mark this as solved, so you can post your own issue. Thanks @merry wren !