You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
nerdctl compose does not support dockerfile_inline #4108
The compose specification contains a dockerfile_inline feature that is used instead of an external dockerfile. Currently this is not supported in nerdctl.
Describe the solution you'd like
Added support for the feature.
Additional context
Given the compose.yaml:
services:
foo:
build:
dockerfile_inline: | FROM scratch
nerdctl compose build says:
WARN[0000] Ignoring: build: [DockerfileInline]
INFO[0000] Building image a-foo
FATA[0000] lstat /a/Containerfile: no such file or directory
FATA[0000] error while building image a-foo: exit status 1
Error: exit status 1
@AkihiroSuda, we use nerdctl build behind the scenes to build the image and assume that a Dockerfile or a Containerfile would be in the project path.
Is there any preferred approach to implement this one? I was thinking of writing the dockerfile_inline to a tmp directory and then running a nerdctl build -t <tag> -f /tmp/<random-dir>/Dockerfile <project-path> for it.
@apostasie ahh sorry I have been travelling for the past few weeks. I still plan to do it over weekends, but if you are interested you can take over, :) I will try finding something else.
Activity
tushar5526 commentedon Apr 26, 2025
I can try it if no one is already working on it.
AkihiroSuda commentedon Apr 29, 2025
Thanks
tushar5526 commentedon May 3, 2025
@AkihiroSuda, we use
nerdctl buildbehind the scenes to build the image and assume that aDockerfileor aContainerfilewould be in theprojectpath.Is there any preferred approach to implement this one? I was thinking of writing the
dockerfile_inlineto atmpdirectory and then running anerdctl build -t <tag> -f /tmp/<random-dir>/Dockerfile <project-path>for it.I also thought of specifying the
Dockerfilecontents directly viastdinhttps://docs.docker.com/build/concepts/context/#local-context-with-dockerfile-from-stdin - but it seemsnerdctldoes not implement this functionality.AkihiroSuda commentedon May 3, 2025
SGTM
apostasie commentedon May 17, 2025
@tushar5526 still interested in implementing this?
tushar5526 commentedon May 20, 2025
@apostasie ahh sorry I have been travelling for the past few weeks. I still plan to do it over weekends, but if you are interested you can take over, :) I will try finding something else.
apostasie commentedon May 20, 2025
Cool!
Go for it @tushar5526 all yours
tushar5526 commentedon Jun 4, 2025
Started a draft PR.