containers / containers/podman-compose

Build env variables not used in Dev Containers

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

Description

**Describe the bug**
When used in Dev Containers settings, build arguments for dockerfile are not passed to Podman from podman-composeto Podman.

**To Reproduce**
Steps to reproduce the behavior:
1. Use this repo: https://gitlab.com/cognitive-science1/fsl-starter/
2. Open it in VS Code
3. Open it in Dev Containers
This is tested on PopOS! (Ubuntu22.04) based system with NVidia RTX 2080, driver 565.77. One can disable including GPU with deleting lines [lines L27-L33 in Dockerfile](https://gitlab.com/cognitive-science1/fsl-starter/-/blob/main/.devcontainer/docker-compose.yml?ref_type=heads#L27-L33).

**Expected behavior**
Image is failing to build since it is searching for "default" version (intentionally incorrect). This means no argument is passed from `docker-compose.yml` to the podman's build process, and build is falling back to default arguments defined in Dockerfile.

**Actual behavior**
Process should use arguments given in

**Output**

```
$ podman-compose version
podman-compose version 1.3.0
podman version 4.6.2
podman --version
podman version 3.4.0

$ podman version
Client: Podman Engine
Version: 4.6.2
API Version: 4.6.2
Go Version: go1.18.1
Built: Thu Jan 1 01:00:00 1970
OS/Arch: linux/amd64

```

**Environment:**
- OS: Linux
- podman version: 4.6.2
- podman compose version: (git hex) c46ecb226beedc761f850a403f23009f70fb14b5
- podman compose installed via 'podman-compose @ git+https://github.com/containers/podman-compose.git@c46ecb226beedc761f850a403f23009f70fb14b5'

**Additional context**

This is tested only in devcontainer settings in settings in which docker compose works fine.
VS Code Settings to reproduce this issue:
* Dev > Containers: Docker compose Path: `podman-compose`
* Dev > Containers: Docker compose Path: `podman-compose`
* Dev > Containers: Docker Socket Path: `unix:///run/user/1000/podman/podman.sock`

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.