Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jobcespedes/dockerfile_builder
Generate Dockerfiles and build image containers using Ansible
https://github.com/jobcespedes/dockerfile_builder
Last synced: 25 days ago
JSON representation
Generate Dockerfiles and build image containers using Ansible
- Host: GitHub
- URL: https://github.com/jobcespedes/dockerfile_builder
- Owner: jobcespedes
- License: mit
- Created: 2019-12-16T16:59:57.000Z (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-29T15:25:25.000Z (7 months ago)
- Last Synced: 2024-03-30T05:23:05.633Z (7 months ago)
- Language: Jinja
- Size: 52.7 KB
- Stars: 2
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Role Name: dockerfile_builder
=========[![Build Status](https://travis-ci.com/jobcespedes/dockerfile_builder.svg?branch=master)](https://travis-ci.com/jobcespedes/dockerfile_builder) [![Buy me a coffee](https://img.shields.io/badge/$-BuyMeACoffee-blue.svg)](https://www.buymeacoffee.com/jobcespedes)
Generate Dockerfiles and build image containers using Docker (default) or Podman
Requirements
------------- docker(default) or podman
- rsyncRole Variables
--------------- See [`defaults/main.yml`](defaults/main.yml).
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:
```bash
├── example.com
│ ├── mycontainer
│ │ ├── conf
│ │ │ └── myfile
│ │ └── Dockerfile.j2
│ └── mycontainer2
│ ├── conf
│ │ └── myfile2
│ └── Dockerfile.j2
├── playbook.yml```
```yaml
- 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: [email protected]