Skip to content

Dockerfile fails on distroless base due to missing /bin/sh (e.g., when used with Smithery) #121

@asifdotpy

Description

@asifdotpy

Describe the bug

The Dockerfile in this repository uses gcr.io/distroless/base-debian12 as the base image, which does not include a shell (/bin/sh). As a result, any RUN step that tries to execute shell commands (e.g., checking for Alpine or installing dependencies) fails. This breaks automated build tools such as Smithery.ai which rely on these steps to work correctly.

Affected version

Please run docker run -i --rm ghcr.io/github/github-mcp-server ./github-mcp-server --version and paste the output below

Pending output from docker command (replace this with actual output)

Steps to reproduce the behavior

  1. Fork or clone the MCP Server repo.
  2. Try to deploy it using https://smithery.ai
  3. See error due to Dockerfile failure caused by the shell-less base image.

Expected vs actual behavior

Expected: The Dockerfile should work with shell-based commands or use a multi-stage build process that avoids distroless shells during installation steps.

Actual: Build fails with an error:

The Dockerfile in this repository is broken. It attempts to run a shell command (/bin/sh) in the distroless base image...

This makes it incompatible with common CI/CD workflows and server platforms.

Logs

Found Dockerfile in repository.
Could not find smithery.yaml in repository. Generating... (this could take 10 minutes)
Failed to generate missing build config files. Reason:
Error type: build_failure
Reason:
The Dockerfile in this repository is broken. It attempts to run a shell command (/bin/sh) in the distroless base image (gcr.io/distroless/base-debian12), which does not include a shell. This occurs in the RUN step that checks for Alpine Linux and installs additional libraries. Please modify the Dockerfile to either remove or adjust that RUN command (for example, by using a base image that provides a shell or by executing that logic during the build stage instead).
Could not pull or automatically generate required build config files. Please create the build config files manually in your repository and try again.

Metadata

Metadata

Assignees

No one assigned

    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