![]() The value of the first FROM statement in the Containerfile was replaced with the argument that we passed with the -from option. You can see that the alpine:latest container image was first used, and now after the busybox image was created, the files from alpine's /bin/df were copied into the /tmp/df_tester directory on busybox. # buildah bud -t multi -f ~/Containerfile.multifrom -from alpine:latest. In this example, we'll run the same bud command, but this time we'll add -from alpine:latest. It would be nice, especially in a CI environment, to just pass in the container image that you want to use on the next run rather than recreate the entire Dockerfile. Now imagine a more real-world situation, one where your FROM statement points to a custom-built image with a variety of tags for different versions of the image. Resolved "busybox" as an alias (/root/.config/containers/nf) Resolved "fedora" as an alias (/etc/containers//nf) # buildah bud -t multi -f ~/Containerfile.multifrom. Then the busybox image is used and then finally copying the files from fedora's /bin/df directory into the busybox images' /tmp/df_tester directory. We can do an initial run, and it will show that we used the fedora container image. For instance, if we have this Containerfile: # cat ~/Containerfile.multifromĬOPY -from=builder /bin/df /tmp/df_tester This option allows you to replace the value associated with the first-and only the first- FROM statement in the Containerfile. There's a new -from option in the buildah bud command that will soon make its way into Podman v3.0. ![]() Change the first FROM in your Containerfile So let's dive in and break out these shiny new container tools. As I received some nice feedback from that demonstration, I felt a follow-up post might be helpful too. We've had many big announcements with Podman v3.0, so I thought some of these tools might have been overshadowed. Recently I did a demo at the Podman Community Meeting showing off some of the shinier new container tools that we've developed for Podman and Buildah. Give me an aisle of video cards at a computer store, and I'm a happy camper. ![]() A practical introduction to container terminologyĪt least that's what my wife tells me, and you see, she's the handy person in our family.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |