Skip to content

bug: Devcontainer Feature Entrypoints not invoked #18831

@scuba10steve

Description

@scuba10steve

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

It appears that coder, when creating a devcontainer workspace, does not invoke devcontainer entrypoints.

In my example I was using the docker-in-docker feature. Here's a relevant .devcontainer/devcontainer.json:

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github.com/devcontainers/templates/tree/main/src/alpine
{
	"name": "GitLab Runner Infrastructure",
	// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
	"image": "mcr.microsoft.com/devcontainers/base:ubuntu",
	// "dockerComposeFile": "docker-compose.yml",
	// "service": "workspace",
	"features": {
		"ghcr.io/devcontainers/features/terraform:1": {},
		"ghcr.io/devcontainers/features/docker-in-docker:2": {},
		"ghcr.io/devcontainers/features/common-utils:2": {},
                "ghcr.io/skriptfabrik/devcontainer-features/gitlab-cli:1": {}
	}
	// "workspaceFolder": "/workspace/workspace"

	// Features to add to the dev container. More info: https://containers.dev/features.
	// "features": {},

	// Use 'forwardPorts' to make a list of ports inside the container available locally.
	// "forwardPorts": [],

	// Use 'postCreateCommand' to run commands after the container is created.
	// "postCreateCommand": ".devcontainer/postinstall.sh"

	// Configure tool-specific properties.
	// "customizations": {},

	// Uncomment to connect as root instead. More info: https://aka.ms/dev-containers-non-root.
	// "remoteUser": "root"
}

In order to use docker while in the workspace via the feature I have to execute dockerd & 2&1 > /dev/null, typically the devcontainer feature endpoint handles this.

See: https://github.com/devcontainers/features/blob/main/src/docker-in-docker/devcontainer-feature.json#L65

Relevant Log Output

Expected Behavior

No response

Steps to Reproduce

  1. Ensure template for devcontainers exists or create one (default example)
  2. Create a workspace using the above template
  3. run docker ps

Environment

  • Host OS: N/A
  • Coder version: 2.23.2

Additional Context

The issue occurs consistently

Metadata

Metadata

Assignees

No one assigned

    Labels

    needs-triageIssue that require triage

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy