Skip to content
This repository was archived by the owner on Jun 23, 2025. It is now read-only.
This repository was archived by the owner on Jun 23, 2025. It is now read-only.

postCreateCommand Fails Due to Missing Go Binary in Runtime Image #1644

@joissriram99

Description

@joissriram99

Description

The postCreateCommand in the devcontainer.json file fails with the error /bin/sh: go: not found.

Explanation

The issue arises because the go command is not available in the container during the execution of the postCreateCommand in the devcontainer.json file. This happens because the base Alpine image used in the second stage of the Dockerfile does not include the Go runtime or tools, as they are only present in the builder stage.

Environment Details

  • Host OS: macOS (macOS sequoia 15.3.1)
  • Devcontainer: Using VS Code Remote - Containers

Steps to Reproduce the Issue

  • Use the provided Dockerfile.
  • Attempt to build and run the container in a development environment using a devcontainer.json.
  • Observe the error: /bin/sh: go: not found.

Summary

Image Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions