containers / containers/podman-compose
Using the build dockerfile option is not possible when the context is a Git repository.
- Dominant language
- Python
- Stars
- 6.2k
- Forks
- 622
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the bug**
Using the build dockerfile option is impossible if the context is a git repo.
**To Reproduce**
For instance, in a compose.yaml file for a FreshRSS container:
```
build:
context: https://github.com/FreshRSS/FreshRSS.git#latest
dockerfile: Docker/Dockerfile
```
Error: no Containerfile or Dockerfile specified or found in context directory, /var/tmp/buildah3873079920/download: no such file or directory
It works with Podman using the `builf -f` argument:
```
sudo podman build \
--format docker \
--pull \
--tag freshrss/freshrss:latest \
-f Docker/Dockerfile \
https://github.com/FreshRSS/FreshRSS.git#latest
```
**Expected behavior**
I think it should work to use the dockerfile build option with a Git repository, because it works with Podman. Perhaps this is intentional, but I’m not sure why.
**Environment:**
- OS: Arch Linux 7.1.3-arch1-2
- podman version: 6.0.1
- podman compose version: 1.6.0
**Additional context**
https://github.com/containers/podman-compose/blob/8156ab4bc9fc90a10f81242c81136155973e165a/podman_compose.py#L3470
Thanks 😄
Contributor guide
Research direction
Start in podman_compose.py around the linked code at line 3470, then reproduce the FreshRSS compose configuration using a Git repository context and Docker/Dockerfile. Trace how the build dockerfile option is passed for that context. Done means the example builds successfully with the requested Dockerfile, matching the Podman build behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dockerfile, python
- Domain
- devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100