Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No applications when dashboard running inside Docker-compose #173

Closed
guangdashao opened this issue Oct 26, 2021 · 2 comments
Closed

No applications when dashboard running inside Docker-compose #173

guangdashao opened this issue Oct 26, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@guangdashao
Copy link

guangdashao commented Oct 26, 2021

Ask your question here

I'm setting up a local environment with docker-compose.yaml

dashboard:
  image: "daprio/dashboard:0.8.0"
  container_name: dapr_dashboard
  init: true
  network_mode: "host"
  command: [ "-port", "8080"]

when run dapr with docker

docker-compose.yaml

ems-dapr:
  image: "daprio/dapr:1.3.1"
  container_name: ems_dapr
  init: true
  command: ["./daprd",
   "--app-id", "ems",
   "--log-level","debug",
   "--app-port", "6060",
   "--dapr-http-port","3000",
   "--metrics-port","49090",
   "--dapr-grpc-port", "40000",
   "--config","/dapr/config.yaml"]
  volumes:
      - "/root/.dapr:/dapr"
  depends_on:
    - emsp-backend
  network_mode: "host"

The configuration itself works fine, dashboard doesn't recognize dapr sidecar containers

image

i read the code ,found dashboard can't get applications when running in standalone with docker

// getStandaloneInstances returns the Dapr instances running in the standalone environment

import (
    ......
    "github.com/dapr/cli/pkg/standalone"
        ......
)
......
func (i *instances) getStandaloneInstances(scope string) []Instance {
    list := []Instance{}
    output, err := standalone.List()

......

standalone.List() import from dapr cli "github.com/dapr/cli/pkg/standalone"

dapr cli project file: /pkg/standalone/list.go
when list all dapr applications
frist: filter sidecar process

 // Populates the map if all data is available for the sidecar.
for _, proc := range processes {
	executable := strings.ToLower(proc.Executable())
	if (executable == "daprd") || (executable == "daprd.exe") {
		procDetails, err := process.NewProcess(int32(proc.Pid()))
		if err != nil {
			continue
		}

then: filter cli process

   // The master list comes from cli processes, even if sidecar is not up.
for _, proc := range processes {
	executable := strings.ToLower(proc.Executable())
	if (executable == "dapr") || (executable == "dapr.exe") {
		pID := proc.Pid()

can't find dapr process
image

@artursouza
Copy link
Member

This is a missing feature. It was never designed to run inside a container for local mode, only K8s. I can take a PR that enabled container mode for the Dashboard.

@artursouza artursouza added the enhancement New feature or request label Nov 8, 2021
@artursouza
Copy link
Member

Closing in favor of #172

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants