containers / containers/podman-compose

Vscode override file breaks build

Open
#1,156 3 comments 2 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
6.2k
Forks
622
PR merge metrics
No merged PRs in 30d

Description

The issue:
```
[2025-03-03T22:25:07.801Z] ValueError: can't merge value of [args] of type and
[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

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.