microsoft / vscode-remote-release

Visual Studio Code Remote Development: Open any folder in WSL, in a Docker container, or on a remote machine using SSH and take advantage of VS Code's full feature set.
https://aka.ms/vscode-remote
Other
3.61k stars 275 forks source link

An error ocurred setting up the container #6787

Closed IgnisDa closed 1 year ago

IgnisDa commented 2 years ago

image

I also tested the same with the latest pre-release version but got the same error.

I have another project which does not have a docker-compose.yml in .devcontainer and that project works fine with the current extension. So I think something is wrong with how the docker-compose is used. Here is it for reference.

.devcontainer/docker-compose.yml

version: '3.9'

services:
  app:
    build:
      context: .
      dockerfile: Dockerfile
    volumes:
      - ..:/workspace:cached
    command: sleep infinity
    user: node

  db:
    image: postgres:latest
    restart: unless-stopped
    volumes:
      - postgres-data:/var/lib/postgresql/data
    environment:
      POSTGRES_PASSWORD: postgres
      POSTGRES_USER: postgres
      POSTGRES_DB: postgres

  cache:
    image: redis:latest
    restart: unless-stopped
    volumes:
      - redis-cache:/data

volumes:
  postgres-data:
  redis-cache:

.devcontainer/Dockerfile

ARG VARIANT=16
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}

RUN su node -c "npm install -g yarn pnpm @nestjs/cli ts-node @nrwl/cli nx"

# install the esteem cli to make it easier to manage nx monorepos
RUN curl https://raw.githubusercontent.com/IgnisDa/developrs/main/packages/esteem/install.sh | sudo sh -s -- --yes

docker-compose version

image

IgnisDa commented 2 years ago

When I click on Remote Containers: Rebuild and Reopen in Container, I get this error:

image

I already have docker compose installed and working

image

IgnisDa commented 2 years ago

Weirdly enough it starts working again when I delete and then clone the project again. But it results in a lot of wasted time (because the project is quite large).

chrmarti commented 2 years ago

Does docker-compose version --short (note the dash in docker-compose) work when you run it from the command line?

IgnisDa commented 2 years ago

I already added screenshots for both commands with and without dash. Please see above.

github-actions[bot] commented 1 year ago

Hey @chrmarti, this issue might need further attention.

@IgnisDa, you can help us out by closing this issue if the problem no longer exists, or adding more information.

github-actions[bot] commented 1 year ago

This issue has been closed automatically because it needs more information and has not had recent activity. See also our issue reporting guidelines.

Happy Coding!