Skip to content

Local source for docker_image_load #1106

@nabeelsherazi

Description

@nabeelsherazi
SUMMARY

Hello! It would be useful to have to have the option to set local_src: true in docker_image_load and save some steps in Docker image loads.

ISSUE TYPE
  • Feature Idea
COMPONENT NAME

community.docker.docker_image_load, local_src: true

ADDITIONAL INFORMATION

Currently, to load a Docker image from a tar or tar.gz, one must first copy it to the remote, then run Docker load. This could be done in one step by piping the image tarball into docker load directly, e.g. from the shell we typically do ssh user@host "docker load" < image:tag.tar.gz to save the separate copy and load steps. If docker_image_load supported a local_src option, something similar could be implemented.

- name: Load all image(s) from the given tar file
  community.docker.docker_image_load:
    path: /path/on/controller/to/image.tar
    local_src: true
  register: result

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions