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 docker compile file(s) #28

Open
lonix1 opened this issue Feb 12, 2019 · 4 comments
Open

No docker compile file(s) #28

lonix1 opened this issue Feb 12, 2019 · 4 comments

Comments

@lonix1
Copy link

lonix1 commented Feb 12, 2019

I'm using ubuntu.

It tells me No docker compile file(s) in the sidebar. And a little popup shows an error with

Docker Compose Error: Command failed: docker-compose -f docker-compose.yml ps
.FileNotFoundError: [Errno 2] No such file or directory: './docker-compose.yml'

I have a docker-compose.yml file, but not in the project root. Should it be discovered?

@p1c2u
Copy link
Owner

p1c2u commented Feb 26, 2019

@lonix1 if it's not in project root you should define docker-compose.files.

@lonix1
Copy link
Author

lonix1 commented Feb 26, 2019

If I set this:

"docker-compose.files": [
  "foo/bar/baz/docker-compose.yml"
]

And reload vscode, then it detects the file. But there are problems:

  1. I have an .env file which configures the docker-compose file, and the extension doesn't consider it and so shows me errors

Docker Compose Error: Command failed: docker-compose -f ./foo/bar/baz/docker-compose.yml ps
The FOO variable is not set. Defaulting to a blank string.
The BAR variable is not set. Defaulting to a blank string.
The BAZ variable is not set. Defaulting to a blank string.
The Compose file '././foo/bar/baz/docker-compose.yml' is invalid because:
...more errors, it should be a number, or an object

  1. it's not a user friendly way to manage many yml files in different directories.... would be nice if it scanned automatically and found them

@p1c2u
Copy link
Owner

p1c2u commented Feb 26, 2019

Ad. 1 That's what I'm working on

@kitingChris
Copy link

I tried it with

    "docker-compose.files": [
        "**/docker-compose.yml",
        "**/docker-compose.*.yml"
    ]

Looks like it does not have any effect:

Docker Compose Error: Command failed: docker-compose -f docker-compose.yml ps
.FileNotFoundError: [Errno 2] No such file or directory: './docker-compose.yml'

Even if pointing to a specific file with path like @lonix1 did it does still try to use ./docker-compose.yml

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

No branches or pull requests

3 participants