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

Vscode override file breaks build #1156

Open
toofewtooextra opened this issue Mar 3, 2025 · 1 comment
Open

Vscode override file breaks build #1156

toofewtooextra opened this issue Mar 3, 2025 · 1 comment
Labels
bug Something isn't working

Comments

@toofewtooextra
Copy link

The issue:

[2025-03-03T22:25:07.801Z] ValueError: can't merge value of [args] of type <class 'dict'> and <class 'list'>
[2025-03-03T22:25:07.825Z] Error: executing /home/admin/.nix-profile/bin/podman-compose --project-name mydevcontainer -f /home/admin/Code/my/.devcontainer/docker-compose.yml -f /home/admin/.config/Code/User/globalStorage/ms-vscode-remote.remote-containers/data/docker-compose/docker-compose.devcontainer.build-1741040707624.yml build: exit status 1

Given the part of docker-compose.yml:

  my-service-vscode:
    build:
      context: ../
      dockerfile: .devcontainer/Dockerfile
      args:
        OS_VERSION: '1.8.1'
        PYTHON_VERSION: '3.12.7'

when choosing "open in devcontainer" vscode automatically adds override file:

[2025-03-03T22:25:07.624Z] Docker Compose override file for building image:
version: '3'

services:
  my-service-vscode:
    build:
      dockerfile: /tmp/devcontainercli-admin/container-features/0.73.0-1741040707621/Dockerfile-with-features
      args:
        - BUILDKIT_INLINE_CACHE=1
        - _DEV_CONTAINERS_BASE_IMAGE=dev_container_auto_added_stage_label

Docker-compose allow args to be in both forms: mapping and a list. Yet podman-compose could not merge it, while docker have no problem

To Reproduce
create any local docker-compose and dockerfile with args as devcontainer in vscode

Expected behavior
Merge of list and dict of args

Actual behavior
Error about incompatible types

Output

$ podman-compose version
podman-compose version 1.3.0
podman version 5.4.0
podman --version 
podman version 5.4.0


**Environment:**
 - OS: arch linux/podman from home-manager
@toofewtooextra toofewtooextra added the bug Something isn't working label Mar 3, 2025
@toofewtooextra
Copy link
Author

toofewtooextra commented Mar 3, 2025

also removing args from override file or changing them to mapping allows build process, so the problem in this part

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant