Skip to content

Docker container fails to start due to bun dependency install issue #4774

Closed

Description

@Nindaleth

Description

Using the docker run -it --rm ghcr.io/sst/opencode command from Install - Using Docker, the following happens:

# docker run -it --rm ghcr.io/sst/opencode
Unable to find image 'ghcr.io/sst/opencode:latest' locally
latest: Pulling from sst/opencode
Digest: sha256:1ace13d6e85d98a3edcebf6eb973f7f5b619fd8cfcd5b8a38896c8f67c4d310a
Status: Downloaded newer image for ghcr.io/sst/opencode:latest
^[[O^[[O^[[O^[[O{"name":"BunInstallFailedError","data":{"pkg":"opencode-copilot-auth","version":"0.0.7"}}

This is the log on the 2nd try (the control characters are generated by the container):

# docker run -it --rm ghcr.io/sst/opencode
{"name":"BunInstallFailedError","data":{"pkg":"opencode-copilot-auth","version":"0.0.7"}}
^[[O^[[O^[[O^[[O

The container hangs on a black screen for a minute. My public internet should be normally available (as evident from docker pulling the image).

I verified by image hash that the tag latest matches tag 1.0.114.

OpenCode version

1.0.114

Steps to reproduce

docker run -it --rm ghcr.io/sst/opencode

Screenshot and/or share link

No response

Operating System

Fedora 43 x86_64

Terminal

terminator 2.1.5

Activity

  1. added
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 26, 2025
  2. changed the title [-]Docker container fails on dependency pull[/-] [+]Docker container fails to start due to bun dependency install issue[/+] on Nov 26, 2025
  3. github-actions commented on Nov 26, 2025

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

    Feel free to ignore if none of these address your specific case.

  4. removed
    opentuiThis relates to changes in v1.0, now that opencode uses opentui
    on Nov 26, 2025
  5. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Collaborator

    Does that happen everytime for u? Or is it intermittent

  6. Nindaleth commented on Nov 26, 2025

    @Nindaleth
    ContributorAuthor

    It's very peculiar. On my desktop it works 100% of the time, on my laptop (ThinkPad P14s Gen2, AMD variant) it works 0% of the time, always the same error. Same Fedora 43 on Wayland, same Terminator terminal, sitting on the same desk connected to the same wired LAN.

    What does work on both is docker run -it --rm ghcr.io/sst/opencode --help - the help screen is shown alright, it's just when the TUi is about to start that it gets problematic.

  7. Nindaleth commented on Nov 26, 2025

    @Nindaleth
    ContributorAuthor

    Here's a log I was able to extract from the docker container:
    2025-11-26T220647.log

  8. rekram1-node commented on Nov 26, 2025

    @rekram1-node
    Collaborator

    Ig as a workaround you can pass: OPENCODE_DISABLE_DEFAULT_PLUGINS=true downside is you won't be able to use github copilot oauth or anthropic oauth but everything else should still work

  9. Nindaleth commented on Nov 27, 2025

    @Nindaleth
    ContributorAuthor

    Thanks! This still hangs for about 15 seconds on start, but then runs, that sounds good for now.

  10. Nindaleth commented on Dec 1, 2025

    @Nindaleth
    ContributorAuthor

    I identified 2 separate causes of issues on my work laptop:

    • I use a nonstandard UID and GID for work -> when actually mounting something into the container, I had permission issues left and right... desktop is the usual 1000:1000 so not nearly as many issues there
    • for company needs I have an internal DNS server preset in my docker daemon config, that was resolved by providing nameserver by hand

    I've worked around these issues and now I can code in docker alright.

    BTW, OpenCode seems to expect ripgrep, but it's not available in the official container image.

  11. rekram1-node commented on Dec 1, 2025

    @rekram1-node
    Collaborator

    We automatically install it if it isn't available but I guess that isn't working for you?

  12. Nindaleth commented on Dec 1, 2025

    @Nindaleth
    ContributorAuthor

    No, not even on the desktop where I have no issues, using the default Big Pickle model with the official image.

    The documentation recommends docker run -it --rm ghcr.io/sst/opencode, so even if rg got installed, it will be lost immediately after quitting the container.

    Sorry for going off-topic; I have solved my local root causes and from my perspective this issue can be closed.

  13. rekram1-node commented on Dec 1, 2025

    @rekram1-node
    Collaborator

    ah I see, yeah we will prolly want to bundle it in automatically

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions