最新消息:Welcome to the puzzle paradise for programmers! Here, a well-designed puzzle awaits you. From code logic puzzles to algorithmic challenges, each level is closely centered on the programmer's expertise and skills. Whether you're a novice programmer or an experienced tech guru, you'll find your own challenges on this site. In the process of solving puzzles, you can not only exercise your thinking skills, but also deepen your understanding and application of programming knowledge. Come to start this puzzle journey full of wisdom and challenges, with many programmers to compete with each other and show your programming wisdom! Translated with DeepL.com (free version)

`docker-compose` process finished with exit code 17 - Stack Overflow

matteradmin6PV0评论

I recently migrated from Visual Studio Code to WebStorm and I am facing some issues when I try to run the devcontainer on the WebStorm.

I open the devcontainer.json file and click on the small cube inside the file and select the second option, which is "Create Dev Container and Mount Sources...", then I select WebStorm.

These are the logs that I have once I click on the WebStorm option:

WARN[0000] /Users/gouvea/www/vtal/vtal-api/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] /Users/gouvea/www/vtal/vtal-api/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Building 0.2s (7/7) FINISHED                                                                        docker:default
 => [app internal] load build definition from Dockerfile                                                          0.0s
 => => transferring dockerfile: 163B                                                                              0.0s
 => [app internal] load metadata for docker.io/library/node:20.5.1-slim                                           0.0s
 => [app internal] load .dockerignore                                                                             0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [app 1/2] FROM docker.io/library/node:20.5.1-slim                                                             0.0s
 => CACHED [app 2/2] WORKDIR /home/node/app                                                                       0.0s
 => [app] exporting to image                                                                                      0.0s
 => => exporting layers                                                                                           0.0s
 => => writing image sha256:ab9f0263bedceecf977b16a0200119f2114dd2c537eaed453025d2b4d076fe57                      0.0s
 => => naming to docker.io/library/vtal-api-app                                                                   0.0s
 => [app] resolving provenance for metadata file                                                                  0.0s
Setting up container features:
Downloading common-utils feature manifest…
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/NOTES.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/README.md
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/devcontainer-feature.json
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/install.sh
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/main.sh
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin/code
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin/devcontainer-info
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin/systemctl
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts/bash_theme_snippet.sh
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts/devcontainers.zsh-theme
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts/rc_snippet.sh
Downloading zsh-plugins feature manifest…
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins/README.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins/devcontainer-feature.json
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins/install.sh
Downloading shell-history feature manifest…
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/NOTES.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/README.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/devcontainer-feature.json
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/install.sh
Creating jb-devcontainer-features-7d8c863c532440ab478baabf115af092…
[+] Building 0.2s (5/5) FINISHED                                                                        docker:default
 => [internal] load build definition from Dockerfile.features                                                     0.0s
 => => transferring dockerfile: 132B                                                                              0.0s
 => [internal] load .dockerignore                                                                                 0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [internal] load build context                                                                                 0.0s
 => => transferring context: 50.22kB                                                                              0.0s
 => [1/1] COPY . /tmp/jb-devcontainer-features                                                                    0.0s
 => exporting to image                                                                                            0.0s
 => => exporting layers                                                                                           0.0s
 => => writing image sha256:a43cff8ae2c2fedf56a3d03b780d517224e4d8c18325bac0d5d0489732a9778f                      0.0s
 => => naming to docker.io/library/jb-devcontainer-features-7d8c863c532440ab478baabf115af092                      0.0s
WARN[0000] /Users/gouvea/www/vtal/vtal-api/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] /Users/gouvea/www/vtal/vtal-api/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Running 1/1
 ! app Warning pull access denied for jb-devcontainer-b2661c53ef1cb9890fb2f98e742a488c, repositor...              2.9s 
[+] Building 0.1s (1/1) FINISHED                                                                        docker:default
 => [app internal] load build definition from .features.temp.dockerfile                                           0.0s
 => => transferring dockerfile: 2B                                                                                0.0s
failed to solve: failed to read dockerfile: open .features.temp.dockerfile: no such file or directory
WARN[0000] /Users/gouvea/www/vtal/vtal-api/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] /Users/gouvea/www/vtal/vtal-api/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Running 1/1
 ✔ Container vtal-postgres  Started                                                                               0.2s 
`docker-compose` process finished with exit code 17

I really cannot understand why this is ALWAYS failing. I tried changing some things inside the Dockerfile but I always have the same result...

This is my devcontainer.json:

// For format details, see .json. For config options, see the
// README at: 
{
    "name": "vtal api",
    "dockerComposeFile": [
        "../docker-compose.yaml",
        "docker-compose.yml"
    ],
    "service": "app",
    "workspaceFolder": "/home/node/app",
    "features": {
        "ghcr.io/devcontainers/features/common-utils:2": {},
        "ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
            "plugins": "git git-flow F-Sy-H zsh-autosuggestions zsh-completions",
            "omzPlugins": "  ;
        },
        "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
    },
    "customizations": {
        "vscode": {
            "extensions": [
                "dbaeumer.vscode-eslint"
            ]
        }
    }
}

This is the docker-compose.yml that I have inside the devcontainer folder (at the same level of the devcontainer.json file):

version: '3'
services:
  app:
    volumes:
      - .:/home/node/app:cached

At the root folder, I have this docker-compose.yaml:

version: '3'

services:
  app:
    build: .
    container_name: my-api
    command: ./.docker/start.sh
    ports:
      - 8000:8000
    volumes:
      - .:/home/node/app

  postgres:
    container_name: my-postgres
    image: bitnami/postgresql
    ports:
      - 5432:5432
    environment:
      POSTGRES_USER: docker
      POSTGRES_PASSWORD: mysupersecret
      POSTGRES_DB: mydb
      PGDATA: /data/postgres
    volumes:
      - ./data/pg:/data/postgres

And, the last but not important, the Dockerfile:

FROM node:20.5.1-slim

USER node

WORKDIR /home/node/app

CMD ["tail", "-f", "/dev/null"]

I recently migrated from Visual Studio Code to WebStorm and I am facing some issues when I try to run the devcontainer on the WebStorm.

I open the devcontainer.json file and click on the small cube inside the file and select the second option, which is "Create Dev Container and Mount Sources...", then I select WebStorm.

These are the logs that I have once I click on the WebStorm option:

WARN[0000] /Users/gouvea/www/vtal/vtal-api/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] /Users/gouvea/www/vtal/vtal-api/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Building 0.2s (7/7) FINISHED                                                                        docker:default
 => [app internal] load build definition from Dockerfile                                                          0.0s
 => => transferring dockerfile: 163B                                                                              0.0s
 => [app internal] load metadata for docker.io/library/node:20.5.1-slim                                           0.0s
 => [app internal] load .dockerignore                                                                             0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [app 1/2] FROM docker.io/library/node:20.5.1-slim                                                             0.0s
 => CACHED [app 2/2] WORKDIR /home/node/app                                                                       0.0s
 => [app] exporting to image                                                                                      0.0s
 => => exporting layers                                                                                           0.0s
 => => writing image sha256:ab9f0263bedceecf977b16a0200119f2114dd2c537eaed453025d2b4d076fe57                      0.0s
 => => naming to docker.io/library/vtal-api-app                                                                   0.0s
 => [app] resolving provenance for metadata file                                                                  0.0s
Setting up container features:
Downloading common-utils feature manifest…
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/NOTES.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/README.md
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/devcontainer-feature.json
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/install.sh
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/main.sh
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin/code
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin/devcontainer-info
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/bin/systemctl
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts/bash_theme_snippet.sh
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts/devcontainers.zsh-theme
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers/features/common-utils/scripts/rc_snippet.sh
Downloading zsh-plugins feature manifest…
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins/README.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins/devcontainer-feature.json
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/devcontainers-contrib/features/zsh-plugins/install.sh
Downloading shell-history feature manifest…
Creating directory /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/NOTES.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/README.md
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/devcontainer-feature.json
Writing file /Users/gouvea/.cache/JetBrains/DevContainers/stuartleeks/dev-container-features/shell-history/install.sh
Creating jb-devcontainer-features-7d8c863c532440ab478baabf115af092…
[+] Building 0.2s (5/5) FINISHED                                                                        docker:default
 => [internal] load build definition from Dockerfile.features                                                     0.0s
 => => transferring dockerfile: 132B                                                                              0.0s
 => [internal] load .dockerignore                                                                                 0.0s
 => => transferring context: 2B                                                                                   0.0s
 => [internal] load build context                                                                                 0.0s
 => => transferring context: 50.22kB                                                                              0.0s
 => [1/1] COPY . /tmp/jb-devcontainer-features                                                                    0.0s
 => exporting to image                                                                                            0.0s
 => => exporting layers                                                                                           0.0s
 => => writing image sha256:a43cff8ae2c2fedf56a3d03b780d517224e4d8c18325bac0d5d0489732a9778f                      0.0s
 => => naming to docker.io/library/jb-devcontainer-features-7d8c863c532440ab478baabf115af092                      0.0s
WARN[0000] /Users/gouvea/www/vtal/vtal-api/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] /Users/gouvea/www/vtal/vtal-api/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Running 1/1
 ! app Warning pull access denied for jb-devcontainer-b2661c53ef1cb9890fb2f98e742a488c, repositor...              2.9s 
[+] Building 0.1s (1/1) FINISHED                                                                        docker:default
 => [app internal] load build definition from .features.temp.dockerfile                                           0.0s
 => => transferring dockerfile: 2B                                                                                0.0s
failed to solve: failed to read dockerfile: open .features.temp.dockerfile: no such file or directory
WARN[0000] /Users/gouvea/www/vtal/vtal-api/docker-compose.yaml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
WARN[0000] /Users/gouvea/www/vtal/vtal-api/.devcontainer/docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion 
[+] Running 1/1
 ✔ Container vtal-postgres  Started                                                                               0.2s 
`docker-compose` process finished with exit code 17

I really cannot understand why this is ALWAYS failing. I tried changing some things inside the Dockerfile but I always have the same result...

This is my devcontainer.json:

// For format details, see https://aka.ms/devcontainer.json. For config options, see the
// README at: https://github/devcontainers/templates/tree/main/src/docker-existing-docker-compose
{
    "name": "vtal api",
    "dockerComposeFile": [
        "../docker-compose.yaml",
        "docker-compose.yml"
    ],
    "service": "app",
    "workspaceFolder": "/home/node/app",
    "features": {
        "ghcr.io/devcontainers/features/common-utils:2": {},
        "ghcr.io/devcontainers-contrib/features/zsh-plugins:0": {
            "plugins": "git git-flow F-Sy-H zsh-autosuggestions zsh-completions",
            "omzPlugins": "https://github/z-shell/F-Sy-H https://github/zsh-users/zsh-autosuggestions https://github/zsh-users/zsh-completions"
        },
        "ghcr.io/stuartleeks/dev-container-features/shell-history:0": {}
    },
    "customizations": {
        "vscode": {
            "extensions": [
                "dbaeumer.vscode-eslint"
            ]
        }
    }
}

This is the docker-compose.yml that I have inside the devcontainer folder (at the same level of the devcontainer.json file):

version: '3'
services:
  app:
    volumes:
      - .:/home/node/app:cached

At the root folder, I have this docker-compose.yaml:

version: '3'

services:
  app:
    build: .
    container_name: my-api
    command: ./.docker/start.sh
    ports:
      - 8000:8000
    volumes:
      - .:/home/node/app

  postgres:
    container_name: my-postgres
    image: bitnami/postgresql
    ports:
      - 5432:5432
    environment:
      POSTGRES_USER: docker
      POSTGRES_PASSWORD: mysupersecret
      POSTGRES_DB: mydb
      PGDATA: /data/postgres
    volumes:
      - ./data/pg:/data/postgres

And, the last but not important, the Dockerfile:

FROM node:20.5.1-slim

USER node

WORKDIR /home/node/app

CMD ["tail", "-f", "/dev/null"]
Share Improve this question edited Nov 17, 2024 at 11:57 LazyOne 166k48 gold badges414 silver badges415 bronze badges asked Nov 16, 2024 at 20:06 Felipe GouvêaFelipe Gouvêa 1953 silver badges12 bronze badges 1
  • Does it work without features? I couldn't add them either in my IDEA Ultimate. Seems like Jetbrains bug. – zored Commented Nov 28, 2024 at 18:49
Add a comment  | 

1 Answer 1

Reset to default 0

Try putting docker-compose.yaml file(s) near by devcontainer.json.

Seems like an issue with Jetbrains IDEs.

Post a comment

comment list (0)

  1. No comments so far