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

ECS_CONTAINER_METADATA_URI is not accessible in macOS #1144

Open

Description

@hkawa608

Summary

Programs cannot access the /var/run/docker.sock file in a container when it is a symbolic link with the host path. This means a curl ${ECS_CONTAINER_METADATA_URI} command fails.

Description

  • Which specific command was run?
    ecs-cli local up --force --task-def-file ${taskDefinitionPath}
  • Which version of the CLI you are using? (Run: ecs-cli --version)
    ecs-cli version 1.21.0 (bb0b8f0)
  • Which version of Go are you using? (Run: go version)
    go version go1.17.2 darwin/amd64
  • What platform are you using to run ECS CLI commands? (E.g. Linux, macOS, Windows)
    macOS

Config files

We use a task-definition file.

Expected Behavior

The curl ${ECS_CONTAINER_METADATA_URI} command succeeds from inside a container.

Observed Behavior

At a terminal inside a conainer

sh-4.2# curl -v --unix-socket /var/run/docker.sock http://v1.27/containers/json?limit=0
*   Trying /var/run/docker.sock...
* Immediate connect fail for /var/run/docker.sock: No such file or directory
* Closing connection 0
curl: (7) Couldn't connect to server

Activity

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

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