Open
Description
SUMMARY
I'd like to ask if community.docker.docker_image
can be extended to allow build
param to use a URL of a git
repository.
As noted in the docker build
documentation [1], users can build an image directly from the command line by passing the URL
ISSUE TYPE
- Feature Idea
COMPONENT NAME
community.docker.docker_image
->build
param
ADDITIONAL INFORMATION
I'd imagine the configuration could look something like this. Notice the path
and source
flags.
Note that source=git
doesn't exist currently in the existing ansible-docker, but I'd imagine something similar would be needed
- name: build docker image for hello-world
community.docker.docker_image:
build:
path: https://github.com/docker-library/hello-world.git#:amd64/hello-world
name: hello-world-custom
source: git
the above command would be equivalent to this
docker build --tag hello-world-custom https://github.com/docker-library/hello-world.git#:amd64/hello-world