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

Support for dockerfile_inline missing #864

Open
wrobelda opened this issue Mar 4, 2024 · 1 comment
Open

Support for dockerfile_inline missing #864

wrobelda opened this issue Mar 4, 2024 · 1 comment
Labels
enhancement New feature or request

Comments

@wrobelda
Copy link

wrobelda commented Mar 4, 2024

Is your feature request related to a problem? Please describe.

Support for dockerfile_inline syntax was added to compose spec 2 years ago:
(compose-spec/compose-spec#298)

It seems, however, that podman is missing support for it. For example, the following example:

services:
  nfsvolumetest:
    build:
      context: .
      dockerfile_inline: |
        FROM docker.io/alpine:latest
        RUN apk update && apk add --update nfs-utils && rm -rf /var/cache/apk/*

results in:

podman-compose version: 1.0.6
['podman', '--version', '']
using podman version: 4.9.2
** excluding:  set()
['podman', 'inspect', '-t', 'image', '-f', '{{.Id}}', 'tmp_nfsvolumetest']
Error: unable to inspect "tmp_nfsvolumetest": failed to find image tmp_nfsvolumetest: tmp_nfsvolumetest: image not known
Traceback (most recent call last):
  File "/opt/homebrew/bin/podman-compose", line 33, in <module>
    sys.exit(load_entry_point('podman-compose==1.0.6', 'console_scripts', 'podman-compose')())
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/podman-compose/1.0.6/libexec/lib/python3.11/site-packages/podman_compose.py", line 2941, in main
    podman_compose.run()
  File "/opt/homebrew/Cellar/podman-compose/1.0.6/libexec/lib/python3.11/site-packages/podman_compose.py", line 1423, in run
    cmd(self, args)
  File "/opt/homebrew/Cellar/podman-compose/1.0.6/libexec/lib/python3.11/site-packages/podman_compose.py", line 1754, in wrapped
    return func(*args, **kw)
           ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/podman-compose/1.0.6/libexec/lib/python3.11/site-packages/podman_compose.py", line 2035, in compose_up
    compose.commands["build"](compose, build_args)
  File "/opt/homebrew/Cellar/podman-compose/1.0.6/libexec/lib/python3.11/site-packages/podman_compose.py", line 1754, in wrapped
    return func(*args, **kw)
           ^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/podman-compose/1.0.6/libexec/lib/python3.11/site-packages/podman_compose.py", line 1994, in compose_build
    build_one(compose, args, cnt)
  File "/opt/homebrew/Cellar/podman-compose/1.0.6/libexec/lib/python3.11/site-packages/podman_compose.py", line 1957, in build_one
    raise OSError("Dockerfile not found in " + ctx)
OSError: Dockerfile not found in .
@wrobelda wrobelda added the enhancement New feature or request label Mar 4, 2024
@kewiha
Copy link

kewiha commented Apr 24, 2024

I confirm dockerfile_inline doesn't seem to be parsed/implemented by podman-compose 1.0.6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants