Skip to content

Docker oven/bun:latest fails during bun install #9807

Closed
@jnsdrssn

Description

@jnsdrssn

What version of Bun is running?

1.1.0

What platform is your computer?

Linux 5.15.0-101-generic aarch64 aarch64

What steps can reproduce the bug?

build a docker file similar to this

FROM oven/bun:latest
WORKDIR /app

# Copy the lock and package file
COPY bun.lockb . 
COPY package.json .
COPY apps/api ./apps/api
COPY packages ./packages

# Install dependencies
RUN bun install

EXPOSE 3001/tcp

USER bun
CMD ["bun", "run", "apps/api/src/index.ts"]

What is the expected behavior?

docker builds successfully

What do you see instead?

0.200 bun install v1.1.0 (5903a614)
6.547 gyp info it worked if it ends with ok
6.547 gyp info using node-gyp@10.1.0
6.547 gyp info using node@21.6.0 | linux | arm64
6.547 gyp ERR! find Python
6.547 gyp ERR! find Python Python is not set from command line or npm configuration
6.547 gyp ERR! find Python Python is not set from environment variable PYTHON
6.547 gyp ERR! find Python checking if "python3" can be used
6.547 gyp ERR! find Python - "python3" is not in PATH or produced an error
6.547 gyp ERR! find Python checking if "python" can be used
6.547 gyp ERR! find Python - "python" is not in PATH or produced an error
6.547 gyp ERR! find Python
6.547 gyp ERR! find Python **********************************************************
6.547 gyp ERR! find Python You need to install the latest version of Python.
6.547 gyp ERR! find Python Node-gyp should be able to find and use Python. If not,
6.547 gyp ERR! find Python you can try one of the following options:
6.547 gyp ERR! find Python - Use the switch --python="/path/to/pythonexecutable"
6.547 gyp ERR! find Python (accepted by both node-gyp and npm)
6.547 gyp ERR! find Python - Set the environment variable PYTHON
6.547 gyp ERR! find Python - Set the npm configuration variable python:
6.547 gyp ERR! find Python npm config set python "/path/to/pythonexecutable"
6.547 gyp ERR! find Python For more information consult the documentation at:
6.547 gyp ERR! find Python https://github.com/nodejs/node-gyp#installation
6.547 gyp ERR! find Python **********************************************************
6.547 gyp ERR! find Python
6.547 gyp ERR! configure error
6.547 gyp ERR! stack Error: Could not find any Python installation to use
6.547 gyp ERR! stack at fail (/tmp/bunx-0-node-gyp@latest/node_modules/node-gyp/lib/find-python.js:305:67)
6.547 gyp ERR! stack at processTicksAndRejections (:12:39)
6.547 gyp ERR! System Linux 5.15.0-101-generic
6.547 gyp ERR! command "/usr/local/bin/bun" "/tmp/bunx-0-node-gyp@latest/node_modules/.bin/node-gyp" "rebuild"
6.547 gyp ERR! cwd /app/node_modules/bufferutil
6.547 gyp ERR! node -v v21.6.0
6.547 gyp ERR! node-gyp -v v10.1.0
6.547 gyp ERR! not ok
6.548
6.548 error: install script from "bufferutil" exited with 1
------
failed to solve: process "/bin/sh -c bun install" did not complete successfully: exit code: 1

Additional information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingdockerAn issue that occurs when running in Docker

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions