containers / podman-compose

a script to run docker-compose.yml using podman
GNU General Public License v2.0
4.98k stars 474 forks source link

Wrong image tagging for multistage builds #104

Open fusselkater opened 4 years ago

fusselkater commented 4 years ago

If I create a Dockerfile with named multistage images, for example backend and frontend, and frontend copies files from backend, podman-compose taggs both image names to the same image id.

Expected behavior is, that two images with a single tag is created.

I created a simple example to reproduce that behavior: Dockerfile.txt docker-compose.yml.txt

(As Github only accepts a few filetypes, I added .txt to both files.)

If I run docker-compose build, both images are built but the last image defined in Dockerfile will get both tags and the other image is not tagged: grafik

If I now do podman-compose up, and podman exec -it test_backend_1 /bin/bash /copiedfile exists in the image instead of testfile.

Greetings Jan

FedericoRessi commented 3 years ago

I have a similar issue with my multistage configuration.