docker / dev-environments

60 stars 32 forks source link

Extends does not seem to work like it should in dev environment #122

Closed donseba closed 1 year ago

donseba commented 2 years ago

Describe the bug The extends tag does not seem to correct the path to the file that is going to extend the service.

To Reproduce

docker-compose.yaml

version: '3.7'

services:

  hello-world:
    image: "hello-world"
    container_name: "hello-world"
    extends:
      file: ./templates.yaml
      service: base-service

templates.yaml

version: '3.7'

services:
  base-service:
    restart: always

Import the project into docker dev environment

The error :

open <project-path>\templates.yaml: The system cannot find the file specified.

If I change the file path to the following :
docker-compose.yaml

version: '3.7'

services:

  hello-world:
    image: "hello-world"
    container_name: "hello-world"
    extends:
      file: ./.docker/templates.yaml
      service: base-service

the first stage does seem to succeed but in the second stage the following error occurs :

open <project-path>\.docker\.docker\templates.yaml: The system cannot find the path specified. exit status 14 exit status 14

Expected behavior Expecting it to work like it should with either the first or the second method.

Desktop (please complete the following information):

Version of Docker Desktop:
You can find the version by clicking on the About Docker Desktop menu

Engine: 20.10.16

Compose: v2.6.0

Credential Helper: v0.6.4

Kubernetes: v1.24.0

Snyk: v1.827.0
glours commented 1 year ago

@donseba in the latest releases of Dev Environments we moved the .docker/docker-compose.yaml file to the main directory with the following name compose-dev.yaml. You can let our migration process take care of that but in your case you'll need to move your template.yaml file next to the new compose-dev.yaml

Let me know if those changes fix your issue

donseba commented 1 year ago

Sorry for coming back to you with this delay but the change solved the issue ! great work and thank you