Skip to content

Building an image with a new name #740

Answered by sshnaidm
lmilbaum asked this question in Q&A
Discussion options

You must be logged in to vote

Please provide path of build context directory, like you do for Podman: podman build /path/to/dir -f Containerfile.

- name: Build Temp image
    containers.podman.podman_image:
      name: "temp_image"
      path: /tmp/
      build:
        file: /tmp/Containerfile
      state: build

You can see examples in the module docs: https://docs.ansible.com/ansible/latest/collections/containers/podman/podman_image_module.html#examples

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sshnaidm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants