0

Getting an error running project using podman on vscode

Project Structure

projectname
|
|----.devcontainer
|        |
|        |-----devcontainer.json
|        |-----docker-compose.yml
|        |-----Dockerfile
├─ src
│  ├─ __init__.py
│  ├─ __pycache__
│  └─ app
│     ├─ __init__.py
│     ├─ __pycache__
│     ├─ api
│     │  ├─ __init__.py
│     │  ├─ __pycache__
│     │  ├─ router.py

I was earlier working with docker and it worked fine. Migrating to podman fails.

Updated devcontainer.json
{
    "name": "Python serverless FastAPI",
    "dockerComposeFile": "docker-compose.yml",
    "service": "app",
    "workspaceFolder": "/workspaces/${localWorkspaceFolderBasename}",
    "features": {
        "ghcr.io/devcontainers/features/docker-in-docker:2": {
            "engine": "podman"
        },
        "ghcr.io/devcontainers-contrib/features/poetry:2": {
            "version": "1.3.2"
        },
        "ghcr.io/devcontainers-contrib/features/pre-commit:2": {
            "version": "2.21.0"
        }
    },
    "postCreateCommand": "make setup",
    "remoteUser": "vscode",
    "mounts": [
        "source=${env:HOME}/.aws,target=/home/vscode/.aws,type=bind,",
        "source=${env:HOME}/.ssh,target=/home/vscode/.ssh,type=bind"
    ]
}

Getting an error :

Error: executing /usr/local/bin/docker-compose --project-name projectname_devcontainer -f /Users/$usrname/Projects/projectname/.devcontainer/docker-compose.yml -f /Users/$usrname/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1739547496527.yml build: exit status 1
[Timestamp] Stop (299464 ms): Run: podman compose --project-name projectname_devcontainer -f /Users/$usrname/Projects/projectname/.devcontainer/docker-compose.yml -f /Users/$usrname/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1739547496527.yml build
[Timestamp] Error: Command failed: podman compose --project-name projectname_devcontainer -f /Users/$usrname/Projects/projectname/.devcontainer/docker-compose.yml -f /Users/$usrname/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1739547496527.yml build
[Timestamp]     at Tm (/Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:433:525)
[Timestamp]     at async ftA (/Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:433:2476)
[Timestamp]     at async htA (/Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:413:3496)
[Timestamp]     at async TtA (/Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:485:4021)
[Timestamp]     at async iB (/Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:485:4963)
[Timestamp]     at async wrA (/Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:666:203)
[Timestamp]     at async DrA (/Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:665:14830)
[Timestamp]     at async /Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js:485:1190
[Timestamp] Stop (303772 ms): Run: /private/var/folders/6h/j2nhfnfx03v5k685_h4hnphmt24_p1/T/AppTranslocation/51D33A69-98FE-4891-90DB-BDD099E6E5F4/d/Visual Studio Code 2.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/$usrname/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --docker-compose-path podman --container-session-data-folder /tmp/devcontainers-e5c55b76-6f1b-4dd1-8c6d-b280edcb11ab1739547490930 --workspace-folder /Users/$usrname/Projects/projectname --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=/Users/$usrname/Projects/projectname --id-label devcontainer.config_file=/Users/$usrname/Projects/projectname/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/$usrname/Projects/projectname/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[Timestamp] Exit code 1
[Timestamp] Command failed: /private/var/folders/6h/j2nhfnfx03v5k685_h4hnphmt24_p1/T/AppTranslocation/51D33A69-98FE-4891-90DB-BDD099E6E5F4/d/Visual Studio Code 2.app/Contents/Frameworks/Code Helper (Plugin).app/Contents/MacOS/Code Helper (Plugin) /Users/$usrname/.vscode/extensions/ms-vscode-remote.remote-containers-0.397.0/dist/spec-node/devContainersSpecCLI.js up --user-data-folder /Users/$usrname/Library/Application Support/Code/User/globalStorage/ms-vscode-remote.remote-containers/data --docker-path podman --docker-compose-path podman --container-session-data-folder /tmp/devcontainers-e5c55b76-6f1b-4dd1-8c6d-b280edcb11ab1739547490930 --workspace-folder /Users/$usrname/Projects/projectname --workspace-mount-consistency cached --gpu-availability detect --id-label devcontainer.local_folder=/Users/$usrname/Projects/projectname --id-label devcontainer.config_file=/Users/$usrname/Projects/projectname/.devcontainer/devcontainer.json --log-level debug --log-format json --config /Users/$usrname/Projects/projectname/.devcontainer/devcontainer.json --default-user-env-probe loginInteractiveShell --mount type=volume,source=vscode,target=/vscode,external=true --skip-post-create --update-remote-user-uid-default on --mount-workspace-git-root --include-configuration --include-merged-configuration
[Timestamp] Exit code 1

How can I resolve it ?

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.