podman-compose icon indicating copy to clipboard operation
podman-compose copied to clipboard

Is it possible to build images in parallel?

Open nyonson opened this issue 2 years ago • 2 comments

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

I have a system which is comprised of many (~10) Go executable services. They are all built out of the same repo and we use a compose file for local development. Calling podman-compose up, it appears that the images are built sequentially. Is it possible to enable some sort of parallel build?

nyonson avatar Aug 15 '22 19:08 nyonson

Maybe this is satisfied by the podman build jobs flag?

nyonson avatar Aug 15 '22 20:08 nyonson

podman build --jobs is used to build multi-stage images like this Dockerfile

FROM busybox
RUN sleep 3
RUN date
RUN touch /foo

FROM busybox
RUN sleep 3
RUN date
RUN touch /foo

FROM scratch
COPY --from=0 /foo /foo-0
COPY --from=1 /foo /foo-1

it's not designed to build multiple dockerfiles

I'll see what I can do.

muayyad-alsadi avatar Aug 16 '22 18:08 muayyad-alsadi

Hello @muayyad-alsadi I have the same question, just curious if there are any updates on this? Thanks!

ikegentz avatar Feb 13 '23 15:02 ikegentz

In addition to this, might be the wrong issue but is related to building in parallel. I wrote my own script to build in parallel using podman build, it works except for when using the --ssh default flag. Podman seems to have trouble using an ssh agent on simultaneous builds getting this error

error serving agent: read unix /var/tmp/.buildah-ssh-sock3872979074/ssh_auth_sock->@: use of closed network connection

https://github.com/containers/buildah/issues/4777

alechirsch avatar May 08 '23 20:05 alechirsch