containers / containers/podman-compose

idmap volume option not supported

Open
#773 1 comment 11 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**
The `idmap` volume option (https://docs.podman.io/en/latest/markdown/podman-run.1.html#volume-v-source-volume-host-dir-container-dir-options) doesn't seem to be supported by podman-compose.

**To Reproduce**
Steps to reproduce the behavior:
1. what is the content of the current working directory (ex. `docker-compose.yml`, `.env`, `Dockerfile`, ...etc.)

docker-compose.yml:
```yml
---
version: "3"
services:
test:
image: "docker.io/debian:bookworm-slim"
init: true
user: "301:301"
volumes:
- "./data:/data:idmap=gids=300-300-100"
```

2. what is the sequence of commands you typed

```
╰─▶ /usr/local/bin/podman_compose.py up
```

**Expected behavior**
Container is created as:
```
podman create --name=tmp_test_1 --pod=pod_tmp --label io.podman.compose.config-hash=20ae2543ef22f90b6107769b28a9fbec5934088e67285ad371957af1e9156292 --label io.podman.compose.project=tmp --label io.podman.compose.version=1.0.7 --label PODMAN_SYSTEMD_UNIT=podman-compose@tmp.service --label com.docker.compose.project=tmp --label com.docker.compose.project.working_dir=/tmp --label com.docker.compose.project.config_files=docker-compose.yml --label com.docker.compose.container-number=1 --label com.docker.compose.service=test -v /tmp/data:/data:idmap=gids=300-300-100 --net tmp_default --network-alias test -u 301:301 --init docker.io/debian:bookworm-slim
```

**Actual behavior**
```
╰─▶ /usr/local/bin/podman_compose.py up «1»
podman-compose version: 1.0.7
['podman', '--version', '']
using podman version: 4.3.1
Traceback (most recent call last):
File "/usr/local/bin/podman_compose.py", line 3209, in
main()
File "/usr/local/bin/podman_compose.py", line 3205, in main
podman_compose.run()
File "/usr/local/bin/podman_compose.py", line 1522, in run
self._parse_compose_file()
File "/usr/local/bin/podman_compose.py", line 1756, in _parse_compose_file
mnt_dict = get_mnt_dict(self, cnt, volume)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/podman_compose.py", line 521, in get_mnt_dict
volume = parse_short_mount(volume, basedir)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/bin/podman_compose.py", line 191, in parse_short_mount
raise ValueError("unknown mount option " + opt)
ValueError: unknown mount option idmap=gids=300-300-100
```

**Output**

```
╰─▶ /usr/local/bin/podman_compose.py version
podman-compose version: 1.0.7
['podman', '--version', '']
using podman version: 4.3.1
podman-compose version 1.0.7
podman --version
podman version 4.3.1
exit code: 0
```

**Environment:**
- OS: Linux
- podman version: 4.3.1
- podman compose version: latest devel (bce40c2)

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.