dockerfile_builder

Role Name: dockerfile_builder

Build Status Buy me a coffee

Generate Dockerfiles and build image containers using Docker (default) or Podman

Requirements

  • docker(default) or podman
  • rsync

Role Variables

Dependencies

  • Depends on other Ansible roles: no

Example Playbook

Create a folder structure for your container(s). There should be at least a Dockerfile.j2 template there. The following is an example for multiple containers:

├── example.com
│   ├── mycontainer
│   │   ├── conf
│   │   │   └── myfile
│   │   └── Dockerfile.j2
│   └── mycontainer2
│       ├── conf
│       │   └── myfile2
│       └── Dockerfile.j2
├── playbook.yml
- hosts: all
  vars:
    mycontainers:
      - example.com/mycontainer
      - example.com/mycontainer2
  tasks:
    - name: include builder role
      loop: "{{ mycontainers }}"
      vars:
        dockerfile_builder_image: "{{ item }}"
      include_role:
        name: jobcespedes.dockerfile_builder

License

MIT

Author Information

Job Céspedes Ortiz: jobcespedes@gmail.com

About

Generate Dockerfiles and build containers with Docker (default) or Podman

Install
ansible-galaxy install jobcespedes/dockerfile_builder
GitHub repository
License
mit
Downloads
29