Public Repository

Last pushed: 2 years ago
Short Description
Runs ansible tasks to download resources.
Full Description

If a project requires pre-requisites from several sources such at bower, composer git, npm, and other tools this image will look for a resource.yml file containing ansible tasks.

Ansible task:

- git: repo=git@github.com:dwdunn/docker-project-template.git
       accept_hostkey=yes
       dest={{ project_path }}/resources/docker-project-template
       version=master

Run with SSH keychain:

docker run --rm -v $(pwd):/tmp/resources -v ~/.ssh:/home/resource_downloader/.ssh -v $(dirname $SSH_AUTH_SOCK):/ssh-agent -e "SSH_AUTH_SOCK=/ssh-agent/ssh" -e "USER_ID=$(id -u)" dwdunn/resource-downloader

Run with non-authenticated resources:

docker run --rm -v $(pwd):/tmp/resources -e "USER_ID=$(id -u)" dwdunn/resource-downloader

Notes:

If a task requires an absolute destination path, use "{{ project_path }}" as displayed above. Within the container, it maps to /tmp/resources/<your project>, which is attached as a volume to the directory containing resource.yml.

If you want to use a different file than resource.yml, set the RESOURCE_FILENAME environment variable to a different file name.

Docker Pull Command
Owner
dwdunn

Comments (0)